Skip to main content

Seventh day with full stack development --> NPM Package installer

 NPM :-

Basic

After Download of node js "Npm" install directly.

To check the npm in cmd type --> npm

Install

we can install package 2 types.

Locally for the directory of projects.

npm install package_name / npm i package_name --> in cmd, make sure firstly open the project folder in which you want to install your npm package.

to use the install package

const var_namerequire("package_name");

Globally for all package

npm install -g  package_name / npm i -g  package_name--> to install globally, use any directory to install
npm link package_name:- open the project folder in cmd and then type command.

make package.json file for your all dependencies.

Open Project in CMD.
Type --> npm init
and give detail and click ok, now your package.json file is made.
Now installing any package details will we automatically update in package.json file, and make sure all the packages should install locally.

Want to install the package, by the package.json

Just type in cmd , and make sure of folder where your project is open.->npm install 



Comments