I'm trying to install ES6 through Babel by following this guy but I'm getting a mistake from my terminal. This is what I see after doing npm install --global babel
/usr/local/bin/babel -> /usr/local/lib/node_modules/babel/cli.js
/usr/local/bin/babel-node -> /usr/local/lib/node_modules/babel/cli.js
/usr/local/bin/babel-external-helpers -> /usr/local/lib/node_modules/babel/cli.js
[email protected] /usr/local/lib/node_modules/babel
When I type in babel-node
You have mistakenly installed the `babel` package, which is a no-op in Babel 6.
Babel's CLI commands have been moved from the `babel` package to the `babel-cli` package.
npm uninstall babel
npm install babel-cli
See http://babeljs.io/docs/usage/cli/ for setup instructions.
I get the same response as before when I try npm uninstall babel
Use this.
npm install --global babel-cli
This installs it globally and works perfectly. And check your package.json, whether babel-cli node is created under dev dependencies:
"devDependencies": {"babel-cli": "^6.14.0"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With