Using command line for babel

I’m on Ubuntu 16.04
I’m in Chapter 17 trying to use the command line

npm install -g babel-cli
npm install --save-dev babel-core
npm install --save-dev babel-preset-es2015
No error messages, no complaints.

Then ran (from correct directory)
babel app/scripts/src/app.js -o app/scripts/dist/main.js

The program ‘babel’ can be found in the following packages:

  • babel-1.4.0
  • openbabel
    Try: sudo apt install

This does not seem correct. Do I really need to install both these pacakges?

Is the word babel an executable? Where is it located?
…/npm/lib/node_modules/babel-cli does not contain any executables.

Any help would be appreciated.

Hi there!

babel should have been installed as an executable text script, and it should reside in the same directory as the node and npm executables.

Would you mind pasting the output of which node and which npm please?