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

npm run build fails due to browserslist 'dead' being unknown query #79

Open
sunnymui opened this issue Aug 29, 2019 · 0 comments
Open

Comments

@sunnymui
Copy link
Contributor

sunnymui commented Aug 29, 2019

Running npm run build to create a production build of the app fails with the following error message:

./src/compositions/FEMAChecklist/FEMAChecklist.css
Module build failed: BrowserslistError: Unknown browser query `dead`
    at Array.forEach (<anonymous>)

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging outpu
t above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Sunny\AppData\Roaming\npm-cache\_logs\2019-08-29T06_27_09_136Z-debug.log

It's likely due to some dependency or something that needs to be updated. More specifically, the issue is with the Browserlist config and some packages using old Browserlist versions, at least from my quick research: https://mixstersite.wordpress.com/2019/02/03/solved-module-build-failed-browserslisterror-unknown-browser-query-dead-react-npm/

Looks like the easiest solution is to create a separate .browserslistrc file cut/paste the browserslist config from package.json into the new .browserslistrc file.

Current browserslist config:

"browserslist": [ ">0.2%", "not dead", "not ie <= 11", "not op_mini all" ],

Other troubleshooting steps include doing an npm update and other stuff mentioned in the linked article.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant