The command "npm run build -- --prod" exited with code 1 error : <p>I'm developing an Asp.Net Core 2 and Angular 5 project in visual studio 2017.  </p>

<p>When I'm going to publish my project then the error '<strong>The command "npm run build -- --prod" exited with code 1</strong>' show in error list window.<br>
I created the project with <a href="https://stackoverflow.com/a/48972840/7487135">Angular CLI in ASP.NET Core 2 Angular template
</a> link and everything was fine and the project run and publish correctly.<br>
After a while, I don't know what exactly happens that cause the project doesn't publish.   </p>

<p>In the npm-debug.log file </p>

<pre><code>0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'run',
1 verbose cli   'build',
1 verbose cli   '--',
1 verbose cli   '--prod' ]
2 info using npm@3.10.10
3 info using node@v6.10.3
4 verbose stack Error: ENOENT: no such file or directory, open 'C:\Project\JWS\JWSApplication\package.json'
4 verbose stack     at Error (native)
5 verbose cwd C:\Project\JWS\JWSApplication
6 error Windows_NT 10.0.15063
7 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "build" "--" "--prod"
8 error node v6.10.3
9 error npm  v3.10.10
10 error path C:\Project\JWS\JWSApplication\package.json
11 error code ENOENT
12 error errno -4058
13 error syscall open
14 error enoent ENOENT: no such file or directory, open 'C:\Project\JWS\JWSApplication\package.json'
15 error enoent ENOENT: no such file or directory, open 'C:\Project\JWS\JWSApplication\package.json'
15 error enoent This is most likely not a problem with npm itself
15 error enoent and is related to npm not being able to find a file.
16 verbose exit [ -4058, true ]
</code></pre>
