javascript - Babel: The CLI has been moved into the package `babel-cli` -


i working on js file @ work had babel installed, running babel file.js | node sent file home work in evening, installed babel @ home , got following error when run above command:

the cli has been moved package 'babel-cli' 

any ideas? thank in advance :)

if install cli - following code fails compile:

function sumarrayindex(array, i, separator) {   return array     .map(x => x.split(separator)       .map(c => { return parseint(c) })     )     .map(x => { return x[i]; })     .reduce((x, y) => { return x += y }, 0); }  function mintosec(m) {   return m * 60 }  function secondstominutesandseconds(s) {   var min = s / 60;   var sec = s % 60;    minutes += math.floor(min);   seconds += sec; }  function outputtime() {   return hours + ':' + minutes + ':' + seconds; } 

babel version 6 split project several modules. message indicates cli has moved babel-cli.

i suggest use same version use @ work (which v5):

npm install -g babel@5 

however, if rather use latest version:

npm install -g babel-cli 

Comments

Popular posts from this blog

java - Static nested class instance -

c# - Bluetooth LE CanUpdate Characteristic property -

JavaScript - Replace variable from string in all occurrences -