Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJonathan Grieve
Treehouse Moderator 91,253 PointsCannot do a React Production Build with npm run build
I've been trying to deploy the Scoreboard app from the React Components course to the following location.
https://projects.jonniegrieve.co.uk/react-scoreboard-v2/
But after the second attempt, I still keep getting errors. I've looked around elsewhere too but I can't find anything close enough to my situation.
Error code ELIFECYCLE.
$ npm run build
> scoreboard@0.1.0 build C:\xamp\htdocs\jgdm-100DaysOfCode\react\scoreboard_v2
> react-scripts build
Creating an optimized production build...
Failed to compile.
./src/index.css
Module build failed: BrowserslistError: Unknown browser query `dead`
at Array.forEach (<anonymous>)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scoreboard@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scoreboard@0.1.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Jonnie\AppData\Roaming\npm-cache\_logs\2018-10-30T08_58_30_155Z-debug.log
the project is in react/scoreboard_v2 in my repo if you need to take a closer look. https://github.com/jg-digital-media/jgdm-100DaysOfCode
Jonathan Grieve
Treehouse Moderator 91,253 PointsJonathan Grieve
Treehouse Moderator 91,253 PointsI'm not sure yet. It seems to be tracing the error to a Bootstrap dependency but my package.json.lock file doesn't seem to have that. I might try changing my css-loader to version 1.0.0 but I don't know if this will have any effect. I'll let you know tomorrow :)