I've been getting this error when trying to do a gulp bundle --ship
command:
The build failed because a task wrote output to stderr. Exiting with exit code: 1
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.
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
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.
It normally happens because of the warnings. You can add suppression like mentioned below in gulpfile.js
build.addSuppression(Warning - [sass] The local CSS class 'ms-Grid' is not camelCase and will not be type-safe.
);
build.addSuppression(/Warning/gi
);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With