-
Notifications
You must be signed in to change notification settings - Fork 228
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
package-lock.json
causes "react-scripts: not found" when deploying
#9
Comments
I just performed a test clone & deploy as directed in the README from master. It deployed successfully. So, what is going on with your setup? Something has been committed or set that is causing this… I see that some of the node modules cache directives have been removed, but the Regarding moving |
…continuing to think about this issue: I see that npm 5's new I'll investigate further. |
Confirmed, I can now reproduce by committing npm 5's
|
package-lock.json
causes "react-scripts: not found" when deploying
I've opened PR with a fix #10 The solution is to replace the "cd react-ui/ && npm install --only=dev && NODE_ENV=development npm install --no-shrinkwrap && npm run build" Here's the change in context. |
…originally proposed solution is just as valid: Move |
OK. So I am not getting that warning anymore and the build is successful, compressed and released. But... When I open the app I get an application error page. I am not getting any error messages form the build log and only a 503 in the console on the page. I have ran I also tested deploying with and without the node module cache directives. I have kept the rest of the configuration as you prescribed in the readme and only added some modules for the API I am using. Do you have any suggestions on how to proceed? |
To diagnose a 503, which typically means that the web process is crashing, run: heroku restart && heroku logs -t What does it output as the web process starts up and then as you make requests to the app? |
That was the nudge I needed. The remaining issues had to do with my configuration but I fixed them using the messages from |
Excellent @joshboyan 🥂 |
I am having a difficult time getting this deployed once I add some more code to the repo.
It works just as expected locally with the
npm run start
andnpm run build
commands.I have been searching stack overflow and haven't found anything. I have even tried to add react-scripts to the Dependencies as well but am still getting this print out when I deploy.
I found that if I set
NPM_CONFIG_PRODUCTION=false
it compiles without any errors and deploys but I just get a 503 error when I check the site.Also, while troubleshooting this I ran the heroku post-build hook
cd react-ui/ && npm install --only=dev && npm install && npm run build
locally from the parent directory and got this message.If the rest of the source would help you can see it here
The text was updated successfully, but these errors were encountered: