Getting "The build failed because a task wrote output to stderr."

Copper Contributor

Hi,

I am getting below error after running command: "gulp package-solution --ship"

 

AbhishekDas08_0-1685024196693.png

Anyone please provide solution as I am SPFX newbie!

Thanks in advance:smile:

4 Replies

@AbhishekDas08 

@AbhishekDas08 

This is normal. The "error" occurs because of the line that appear right after the "Finished" line. Since the command line wrote the "Warning" to the console, you'll see the output to stderr error. It is not really an error, so you can ignore it.

 

The same thing will happen on the ```gulp bundle --ship``` command if there are any warnings. As long as the messages after "Finished" are warnings, just ignore them.

 

Welcome to SPFx!

 
Good luck!
Don

If my answer helps solve or resolve your issue, please consider clicking Mark as Best Response & Like. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it a Like.

@Don Kirkham 

Maybe it is not really an error but id does not create the package file. :)

Any settings that will override this?

I've never had it NOT create the package file. To be sure, there is no .sppkg file in the sharepoint\solution folder?
No.
I fixed the warnings and it did make the file