How to batch run npm install on Windows 10

  • fennng 

If for some reasons, npm update doesn’t fit you need and you need to update some npm packages one by one.

You will want to write a batch command to do it. It seems that a simple bat or cmd file with all the npm installl command listed will work.

But the truth on windows is, only the first command is run.

The reason is that npm itself is not a command but a batch file too. Too make sure all the npm commands will be run, you can add a call in the front of the command.

Check the example below:

call npm install @angular/[email protected]
call npm install @angular/[email protected]
call npm install @angular/[email protected]
call npm install @angular/[email protected]
call npm install @angular/platform-s[email protected]
call npm install @angular/[email protected]
call npm install @angular/[email protected]
call npm install @angular/[email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]
call npm install [email protected]

发表评论

电子邮件地址不会被公开。 必填项已用*标注