Reputation: 85
Im trying to deploy an nodejs app to eb, all my code is using the new js features.
On my package.json I have start command:
scripts : {
start: "babel-node bin/start.js"
}
this works fine on my localhost, when I deploy the app to EB, i get the error on the logs saying:
sh: babel-node: command not found
Can i run the babel-node command on a cloud server, or shall i compile my code before deployment.
Upvotes: 2
Views: 1372
Reputation: 1988
Include babel-cli as a dependency in your package.json
You can do this by doing npm i babel-cli
However
That solves your problem but babel-node is not recommended for production use as stated in the usage docs
Upvotes: 1