vercel: create-react-app build on now fails
Hi. I’m trying to run ‘react-scripts build’ step in package.json scripts ‘now-build’ step. I’m getting the following error:
> ▲ npm run now-build
>
> - index.js:47 Compiler.<anonymous>
> [src]/[b6a523076d54485fee7b51e624a717feb64ba053]/index.js:47:40
>
> Error Error: Command react-scripts build ended with code 1
> at ChildProcess.<anonymous> (/usr/lib/node_modules/@zeit/ace/build/lib/run.js:1:599)
> at emitTwo (events.js:106:13)
> at ChildProcess.emit (events.js:191:7)
> at maybeClose (internal/child_process.js:877:16)
> at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Any suggestions on how to handle this?
Thanks in advance!
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 17 (6 by maintainers)
Commits related to this issue
- Downgrade react-scripts due to zest issue https://github.com/zeit/now-cli/issues/160#issuecomment-266106867 — committed to lyleg/write-good-web by lyleg 8 years ago
It doesn’t ship with the a production webserver. And the
startruns the dev server instead a production useable server…So to deploy it you’ll need to
npm run buildto generate a minified bundle that may be deployed with ~any web server solution.And then for example use
serveto serve that static minified bundle:npm i -S serve@3.1.0and add
now-startscript:Here is a full empty demo app https://react-app-demo-vygvkezcul.now.sh/_src (that I likely will one day accidentally delete…)
I’m happy to announce that the underlying issue with
nowhas been finally fixed andreact-create-apps can now again be deployed on nowDemo app here: https://react-create-app-demo-zqahqhmybz.now.sh/ and src here: https://react-create-app-demo-zqahqhmybz.now.sh/_src/?f=package.json
Apologies for the radio silence 😅
Thank you so much!