【问题标题】:Visual Studio Team Services vNext build webpack errorVisual Studio Team Services vNext 构建 webpack 错误
【发布时间】:2016-11-10 20:15:07
【问题描述】:

我使用 webpack 来打包我的 Angular2 应用程序。如果我在 vNext 托管构建中使用我的 npm run build:prod 我收到此错误:

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

我有这个步骤:

  1. Nuget 恢复
  2. npm 安装
  3. 构建解决方案
  4. 测试程序集
  5. npm run build:prod

在本地 npm run build:prod 工作正常。

【问题讨论】:

    标签: npm webpack azure-devops tfsbuild azure-pipelines


    【解决方案1】:

    在 Run WebPack Build Production 构建步骤中展开 Advanced 部分,然后指定包含您的 package.json 的工作文件夹。

    【讨论】:

    • 哈哈。从昨天到今天,面具好像变了。缺少高级点,但有一个工作文件夹文本框。设置工作文件夹使构建工作。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-12-05
    • 1970-01-01
    • 2013-03-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-10-22
    相关资源
    最近更新 更多