create-react-app: Webpack warnings trigger build errors when running on CI
(Initial discussion starts here.)
Pull request https://github.com/facebookincubator/create-react-app/pull/944 adds a new behaviour related to CIs - crash the build during CI whenever linter warnings are encountered.
This PR however introduced new side effect - webpack warnings will also crash the build, e.g.:
This seems to be a pre-built javascript file. Though this is possible, it's not recommended. Try to require the original source to get better results.
We could consider this particular warning to be harmless.
Since we have no access to webpack config, we cannot use module.noParse
option either.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Reactions: 2
- Comments: 22 (16 by maintainers)
Commits related to this issue
- workaround for webpack warning stopping build (https://github.com/facebookincubator/create-react-app/issues/1150) — committed to participedia/frontend by davidascher 7 years ago
Same issue here. My temporary workaround was to unset
CI
variable in the build script (using.gitlab-ci.yml
):https://github.com/webpack/webpack/issues/4263
I dug a bit further and couldn’t find anything that would provide information about which loader emitted the warning in a reliable manner.
For example an ESLint warning about
eqeqeq
,loaders
property looks like this:There’s also
issuer
andrequest
which are just long!
webpack strings formed from the info above.edit. Maybe we could use
failOnError
andfailOnWarning
provided byeslint-loader
.Haha, MYSTERY FIX
I’ll keep an eye out on my end for any weird changes here regardless.
The funny thing is we didn’t actually do anything to suppress it. I have no idea why it’s gone 😄