I am using babel to build a part of my library and I'm running into issues when i run babel commands through npm.
I have an npm script called build that calls:
{
"prebuild": "rm -rf && mkdir dist",
"build": "babel src/index.js -o dist/index.js"
}
I have run the actual babel command itself in my command line and it works.
However when I do npm run build from my command line it says
The CLI has been moved into the package 'babel-cli'
npm also says that it is that specific line that is failing.
I have already tried the following:
- Restart my terminal.
- Install babel v5 because I read that v6 split a lot of its functionality.
- npm rebuild.
- Delete my node_modules and npm install
Any other ideas? as to why npm fails at running this command?
babel-cli
installed? Try usingbabel@5
and/or donpm install -g babel-cli
babel@5
also in your local project...grunt-cli
(usually)