I have a React / node app that I took over and that I am trying to push to heroku.
I use the following commands to start my app locally:
cd react-web
sudo npm run postinstall
export REACT_APP_CUSTOMER_ENVIRONMENT=testenv
npm start
so, this starts the app. Now for heroku, in my root directory package.json
, I have this start script:
"scripts": {
"test-web": "cd react-web && npm test && cd ..",
"test": "npm run test-web",
"start": "cd react-web && npm run postinstall && export REACT_APP_CUSTOMER_ENVIRONMENT= testenv && npm start"
},
and then in my react-web
package.json
, I have this:
"scripts": {
"start": "node checkEnvironmentForBuild && react-app-rewired start",
"build": "node checkEnvironmentForBuild && react-app-rewired build",
"deploy": "aws s3 sync build/ s3://YOUR_S3_DEPLOY_BUCKET_NAME --delete",
"postdeploy": "aws cloudfront create-invalidation --distribution-id YOUR_CF_DISTRIBUTION_ID --paths '/*' && aws cloudfront create-invalidation --distribution-id YOUR_WWW_CF_DISTRIBUTION_ID --paths '/*'",
"postinstall": "npm link ../shared",
"test": "node checkEnvironmentForBuild && react-app-rewired test",
"eject": "react-scripts eject"
},
in my Procfile, I have this:
web: npm start
when I push to heroku, in the logs, I receive the H12 timeout error
. It basically says it is failing with the start scripts.
anyone know what my problem could be