1

2018-05-16T10:17:54.9953258Z 'npm' is not recognized as an internal or external command.

2018-05-16T10:17:54.9962710Z operable program or batch file.

2018-05-16T10:17:54.9983767Z C:\Agents\agent\projectsource: error MSB3073: The command "npm install" exited with code 9009.

trying to figure out this issue but didn't find any information on it except this Question in MS community

environment:

Asp net core 2.0 with angular 5 template.

k11k2
  • 2,036
  • 2
  • 22
  • 36

1 Answers1

3

Make sure you have installed the npm and NodeJS. And set the path of nodejs in system path variable and local user accounts path variable.

Try below steps to fix that:

Install npm and bower globally. Open up a command prompt as administrator and type

npm install -g bower

If that doesn’t work, try these steps:

  1. Install NodeJS & npm from https://docs.npmjs.com/getting-started/installing-node
  2. Update to the latest NPM: npm install npm@latest -g
  3. Install bower globally: npm install -g bower

And I needed to install Gulp:

npm install -g gulp

Source here : ‘Exited with code 9009’ publishing .NET Core app to Azure Websites

Set User Variable :

Just add:

;C:\Program Files\nodejs\

To the end of your Path variable on the "User variable" section of the Environment Variables on the System Properties.

Source here: 'npm' is not recognized as internal or external command, operable program or batch file

Andy Li-MSFT
  • 28,712
  • 2
  • 33
  • 55
  • @k11k2 Have you resolved the issue by the answer? any update? – Andy Li-MSFT May 18 '18 at 09:05
  • What I find out is some thing related you have mentioned. after update of `nodejs` and `node-sass` package of their relative version every thing worked fine but bit complicate to know `'npm' is not recognized as an internal or external command` exact meaning in this context. – k11k2 May 18 '18 at 10:25