Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors are not printed to console due to broken require #2936

Closed
svicalifornia opened this issue Aug 10, 2017 · 9 comments
Closed

Build errors are not printed to console due to broken require #2936

svicalifornia opened this issue Aug 10, 2017 · 9 comments

Comments

@svicalifornia
Copy link

Is this a bug report?

Yes

Can you also reproduce the problem with npm 4.x?

Yes.

The Problem

Build errors do not print to console to due to an fatal error introduced in PR #2650.

PR #2650 added a new file printBuildError.js, which requires lodash/get. However, lodash is not listed as a dependency in react-script's package.json, so any execution path that requires printBuildError.js will fail to require 'lodash/get', causing node to throw a fatal exception.

Proposed Resolution

'lodash' or 'lodash.get' should be added to package.json, or the 'lodash/get' require should be removed from printBuildError.js.

@gaearon
Copy link
Contributor

gaearon commented Aug 10, 2017

Also worth looking into why this didn't fail CI.

@Timer
Copy link
Contributor

Timer commented Aug 10, 2017

Hi @svicalifornia; I'd love a bit more information -- are you ejected?

@Timer
Copy link
Contributor

Timer commented Aug 10, 2017

Also, what version of npm are you using?

Really, this shouldn't bomb out with npm >= 3 as it does dependency flattening and lodash is required by inquirer. Though it'd be technically correct to include lodash -- this should only blow up on npm < 3.

@Timer
Copy link
Contributor

Timer commented Aug 10, 2017

Fix up in #2938.

@Timer
Copy link
Contributor

Timer commented Aug 10, 2017

Released in [email protected]. Please upgrade!

@Timer Timer closed this as completed Aug 10, 2017
@svicalifornia
Copy link
Author

@Timer My colleague and I experienced the issue on systems running npm 4.2 and 5.1.0.

Thanks for the quick fix!

@Timer
Copy link
Contributor

Timer commented Aug 10, 2017

Are you ejected?

@svicalifornia
Copy link
Author

We are not ejected, but we are using react-app-rewired to add loaders and plugins to our webpack config.

@Timer
Copy link
Contributor

Timer commented Aug 11, 2017

Hmm interesting. Non determinism at its finest haha.
Glad all is working now!

@lock lock bot locked and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants