The command “npm run build — --prod” exited with code 1 error

前端 未结 8 1953
既然无缘
既然无缘 2020-12-24 11:59

I\'m developing an Asp.Net Core 2 and Angular 5 project in visual studio 2017.

When I\'m going to publish my project then the error \'The command \"npm run

8条回答
  •  再見小時候
    2020-12-24 12:14

    Error: The command "npm install" exited with code 1

    Add environment variable, right click this PC

    • Go to Properties
    • Go to Advance tab
    • Click environment variable
    • In User variable section click new, Enter variable name "Path" and value C:\Users\User\AppData\Roaming\npm
    • One more - In User variable section click new, Enter variable name "Path" and value C:\Program Files\nodejs

    If Path variable already there, then you can edit that variable add new path(value) by ; separation.

提交回复
热议问题