最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Can't install babel-cli - Stack Overflow

programmeradmin2浏览0评论

I'm getting an error when trying to run:

$babel-node ./server.js

The CLI has been moved into the package babel-cli.

$ npm install -g babel-cli

When I install it and run it again it asks again for it. Anyone came across this situation? Can't seem to move forward.

>

 npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v5.1.0
npm ERR! npm  v3.5.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `babel-node ./server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'babel-node ./server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the relay-starter-kit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel-node ./server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls relay-starter-kit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/diogo/Projects/cf-ophite/npm-debug.log

I'm getting an error when trying to run:

$babel-node ./server.js

The CLI has been moved into the package babel-cli.

$ npm install -g babel-cli

When I install it and run it again it asks again for it. Anyone came across this situation? Can't seem to move forward.

>

 npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "start"
npm ERR! node v5.1.0
npm ERR! npm  v3.5.0
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `babel-node ./server.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] start script 'babel-node ./server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the relay-starter-kit package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     babel-node ./server.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls relay-starter-kit
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/diogo/Projects/cf-ophite/npm-debug.log
Share Improve this question edited Dec 27, 2015 at 2:34 loganfsmyth 162k31 gold badges346 silver badges258 bronze badges asked Nov 27, 2015 at 13:31 Diogo BarrosoDiogo Barroso 9153 gold badges9 silver badges22 bronze badges 0
Add a ment  | 

1 Answer 1

Reset to default 6

Babel Version 6 split some packages.

  1. Did you try to open a new terminal window after npm install -g babel-cli ?
  2. You can also install version 5 and work as before: npm install -g babel@5
  3. If this happens after upgrading node, try npm rebuild in your project directory
  4. Another solution is to delete the node_modules folder, and execute npm install again
发布评论

评论列表(0)

  1. 暂无评论