简体   繁体   English

在 VSTS CI Build 中执行 NPM 命令时出错

[英]Error Executing NPM command In VSTS CI Build

I'm new to CI Builds in VSTS and as a result, having a struggle with a specific npm task.我是 VSTS 中 CI 构建的新手,因此,在处理特定的 npm 任务时遇到了困难。

In the Build process, after the first five tasks execute, I use an npm task with a custom command.在构建过程中,前五个任务执行后,我使用带有自定义命令的 npm 任务。 This command executes webpack script defined in my package.json此命令执行在我的 package.json 中定义的 webpack 脚本

在此处输入图片说明

npm run prod npm 运行产品

"prod": "webpack --env.NODE_ENV=production --config webpack.config.js --progress"

When this task runs, it errors with the following message当此任务运行时,它会出错并显示以下消息

Error: Npm failed with return code: 1错误:Npm 失败,返回代码:1

Thoughts?想法? Suggestions?建议? This is trying me a little insane, I'm sure there's a simple solution :)这让我有点疯狂,我相信有一个简单的解决方案:)

替换npm run prod以在命令和参数框中run prod

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在 VSTS 托管生成代理上运行自定义 npm 命令 Powershell - Run custom npm command in Powershell on VSTS hosted build agent 在 VSTS/Azure DevOps 上构建时出现“npm run build”错误 - "npm run build" error when building on VSTS/Azure DevOps 代码构建失败,执行命令时出错:npm install。 原因:退出状态 127 - Code build is failed with Error while executing command: npm install. Reason: exit status 127 执行 npm 命令时出错 - Getting an error when executing npm command 执行“npm start”命令时出错 - Error while executing “npm start” command 执行“ng new”命令时出现 NPM 错误 - NPM error when executing 'ng new' command 代码部署 - COMMAND_EXECUTION_ERROR:执行命令时出错:npm 运行构建。 原因:退出状态2 - code deploy - COMMAND_EXECUTION_ERROR: Error while executing command: npm run build. Reason: exit status 2 VSTS npm自定义构建任务-运行npm脚本失败并出现类型错误 - VSTS npm custom build task - run npm script fails with type error Gitlab CI:即使 NPM 错误也能成功构建 - Gitlab CI: Build successful even though NPM Error npm install需要在VSTS托管版本中进行身份验证 - npm install needs authentication in VSTS hosted build
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM