cpiock
cpiock

Reputation: 1304

Visual Studio Team Services vNext build webpack error

I use webpack to packaging my Angular2 app. If I use my npm run build:prod in the vNext hosted build i recive this error:

2016-11-10T19:58:29.4167668Z npm ERR! enoent ENOENT: no such file or directory, open 'C:\a\1\s\package.json'
2016-11-10T19:58:29.4177672Z npm ERR! enoent ENOENT: no such file or directory, open 'C:\a\1\s\package.json'
2016-11-10T19:58:29.4177672Z npm ERR! enoent This is most likely not a problem with npm itself
2016-11-10T19:58:29.4177672Z npm ERR! enoent and is related to npm not being able to find a file.
2016-11-10T19:58:29.4177672Z npm ERR! enoent 
2016-11-10T19:58:29.4297670Z 
2016-11-10T19:58:29.4297670Z npm ERR! Please include the following file with any support request:
2016-11-10T19:58:29.4297670Z npm ERR!     C:\a\1\s\npm-debug.log
2016-11-10T19:58:29.4457679Z ##[error]Npm failed with error: C:\Program Files\nodejs\npm.cmd failed with return code: 4294963238

I have this steps:

  1. Nuget restore
  2. npm install
  3. build solution
  4. Test assemblies
  5. npm run build:prod

Locally the npm run build:prod works fine.

enter image description here

Upvotes: 0

Views: 459

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33708

Expand Advanced section in Run WebPack Build Production build step, then specify the working folder that contains your package.json.

Upvotes: 3

Related Questions