Skip to content
This repository was archived by the owner on Mar 9, 2025. It is now read-only.

On DigitalOcean ubuntu .. #40

Open
pociej opened this issue Dec 20, 2018 · 1 comment
Open

On DigitalOcean ubuntu .. #40

pociej opened this issue Dec 20, 2018 · 1 comment

Comments

@pociej
Copy link

pociej commented Dec 20, 2018

... after npm install --save-dev babel-cli babel-preset-env
babel is still not available in CL. Instead i see below output.

root@socket-server-ZZ:~/projects/my_app# babel src -d dist/
The program 'babel' can be found in the following packages:
 * babel-1.4.0
 * openbabel
Try: apt install <selected package>
@zerojuan
Copy link

That's because babel-cli is installed locally (in your project directory's node_modules).

You can either:

  • install it globally so you can run it in the shell
npm install -g babel-cli
  • or call babel through an npm script (npm knows how to look inside your node_modules).
 "scripts": {
    "build": "babel src -d dist"
  }

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants