-
Notifications
You must be signed in to change notification settings - Fork 335
Add help suggestion on webpack failure #837
Conversation
src/commands/build/wranglerjs/mod.rs
Outdated
@@ -122,7 +122,9 @@ fn write_wranglerjs_output( | |||
) -> Result<(), failure::Error> { | |||
if output.has_errors() { | |||
message::user_error(output.get_errors().as_str()); | |||
failure::bail!("Webpack returned an error"); | |||
failure::bail!( | |||
"Webpack returned an error. Try re-running npm install, or yarn check --verify-tree." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will running yarn check --verify-tree
create a yarn.lock
file? i'd hesitate to recommend using yarn
when wrangler uses npm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'd just add
"You may be able to resolve this issue by running npm install"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah wasn't sure bout the yarn thing, snagged it from the original issue discussion to see how people reacted. i think that's a good text.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yay :)
a41d722
to
49a6cdd
Compare
webpack builds can fail for a lot of reasons. the biggest one is probably not the node_modules issue, but using a package that is incompatible with i can open an issue for this if we think it's a good idea cc @ashleymichal |
Fixes #428 by including a suggestion to re-run npm install if webpack exits with an error.