Gulp bundle --ship:构建失败,因为任务将输出写入stderr [英] Gulp bundle --ship: The build failed because a task wrote output to stderr

查看:72
本文介绍了Gulp bundle --ship:构建失败,因为任务将输出写入stderr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试执行 gulp bundle --ship 命令时出现此错误:

I've been getting this error when trying to do a gulp bundle --ship command:

构建失败,因为任务将输出写入stderr.使用退出代码退出:1

我对此很陌生,所以不知道如何进行.即使当我现在通过helloworld Webpart运行时,它也在发生. gulp服务有效,只要不向其中添加-ship ,我就可以捆绑和打包解决方案.我以前在同一台计算机上编写和发布过应用程序,所以我不知道现在有什么不同.

I'm pretty new to this so have no idea how to proceed with it. It's happening even when I run through the helloworld webpart now. The gulp serve works and I can bundle and package the solution as long as I don't add a --ship to it. I've written and published apps before on the same machine so I don't know what is different now.

我已经卸载了每个扩展程序并重新安装了该应用程序,但它仍在执行.任何帮助将不胜感激.

I've uninstalled every extension and re-installed the application but it's still doing it. Any help would be appreciated.

推荐答案

为获得快速胜利,您可以使用-debug 标志来捆绑任务,而不是使用-ship 直到此错误在将来的版本中得到修复:

Just for quick win you can use --debug flag for bundling task instead of --ship until this bug will be fixed in future releases:

gulp bundle --debug
gulp package-solution --ship

捆绑的文件将更大,但至少您不会在CI/CD中收到由于任务将输出写入到stderr而导致构建失败"错误.

The bundled file will be bigger, but at least you are not getting "The build failed because a task wrote output to stderr" error in CI/CD.

这篇关于Gulp bundle --ship:构建失败,因为任务将输出写入stderr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆