I\'ve installed the latest version of babel. Currently 6.4.0. I create a file called myclass.js that has the following code.
class MyClass {
constructor(
The exact answer using babel with nodejs (and using CLI):
npm install babel-cli babel-preset-es2015
npx babel ./src/myclass.js --out-file ./out/app.js --presets babel-preset-es2015
When babel-cli is globally installed could be not working. So this is my definitive solution