I am trying to deploy create-react-app to elastic beanstalk. My deployment is constantly timing out with
ERROR: TimeoutError - The EB CLI timed out after 10 minute(s). The operation might still be running. To keep viewing events, run 'eb events -f'. To set timeout duration, use '--timeout MINUTES'.
I have tried a bunch of different things to get this working. This is my config.yml file
my nodecommand.config inside .ebextensions folder:
NodeCommand: "npm start"
^^ I have also tried changing the the node command to react-scripts build and react-scripts start
all dependencies are under dependencies and not devDependencies in package.json, and here are my scripts
"prestart": "react-scripts build",
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"start:prod": "react-scripts start"
I am getting no particular error message, and am unable to review the exact logs as that operation times out too. I've also added this in case it was just a timeout thing:
- namespace: aws:elasticbeanstalk:command
lastly, I deployed a basic node app to see if that would work and it did, so the problem is with the way the create-react-app node server is serving the build folder.
Any direction is appreciated.
If you need to know more about React, Its recommended to join React Certification Course today.