Visual Studio Team Services vNext 构建 webpack 错误
Visual Studio Team Services vNext build webpack error
我使用 webpack 来打包我的 Angular2 应用程序。如果我在 vNext 托管构建中使用 npm 运行 build:prod,我会收到此错误:
2016-11-10T19:58:29.4167668Z npm ERR! enoent ENOENT: no such file or directory, open 'C:\a\s\package.json'
2016-11-10T19:58:29.4177672Z npm ERR! enoent ENOENT: no such file or directory, open 'C:\a\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\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
我有以下步骤:
- Nuget 恢复
- npm 安装
- 构建解决方案
- 测试程序集
- npm 运行 build:prod
本地 npm 运行 build:prod 工作正常。
展开 运行 WebPack Build Production 构建步骤中的 Advanced 部分,然后指定包含您的 package.json.
的工作文件夹
我使用 webpack 来打包我的 Angular2 应用程序。如果我在 vNext 托管构建中使用 npm 运行 build:prod,我会收到此错误:
2016-11-10T19:58:29.4167668Z npm ERR! enoent ENOENT: no such file or directory, open 'C:\a\s\package.json'
2016-11-10T19:58:29.4177672Z npm ERR! enoent ENOENT: no such file or directory, open 'C:\a\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\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
我有以下步骤:
- Nuget 恢复
- npm 安装
- 构建解决方案
- 测试程序集
- npm 运行 build:prod
本地 npm 运行 build:prod 工作正常。
展开 运行 WebPack Build Production 构建步骤中的 Advanced 部分,然后指定包含您的 package.json.
的工作文件夹