I have the following in my package.json
file:
"scripts": {
"migrate": "knex migrate:latest"
},
Running npm run migrate
works fine on my local machine. When I try to add this command onto my existing build command:
App Runner always gives an error and rolls back my change:
Does App Runner not support multiple build commands?
The problem was a combination of running anything other than npm install
in the Build command input and running more than one command in the Start command input. I ended up adding the following to my package.json
file:
"scripts": {
"migrate": "knex migrate:latest",
"launch": "npm run migrate && node index.js"
}
Then running them in App Runner like: