nodejs npm basic command

Log in to the repository that requires authentication

npm login

iop

123456

 

[email protected]



 

 

Check npm version

npm -v

 

Modify repository

Original npm address: http://registry.npmjs.org

Modify it to taobao address:

npm config set registry https://registry.npm.taobao.org

 

 

Download and install dependencies

npm install

 

 

About package.json

 

In a NodeJS project, the package.json file is used to declare the modules used in the project, so that when the new environment is deployed, the required modules can be installed by executing the npm install command in the directory where the package.json file is located .

 

 

 

 

 

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326013403&siteId=291194637