React Solo
React Solo

Reputation: 85

running babel-node commands on AWS elastic Beanstalk?

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

Answers (1)

Pandelis
Pandelis

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

Related Questions