What is the difference between @babel/node
and babel-node
?
I did yarn add babel-node --dev
but I had error.
So I did yarn add @babel/node --dev
, it worked.
What is the meaning of @
?
Asked
Active
Viewed 2,910 times
12

brouk.develop
- 175
- 1
- 14
-
@barbsan Thank you for your edit!! but I don't know well this site so I rollbacked your edit sorry :( – brouk.develop May 09 '19 at 12:15
-
You're welcome. Don't worry, your 2nd rollback rollbacked your 1st rollback, so it contains all changes I've introduced – barbsan May 09 '19 at 12:25
-
@barbsan Thanks!! This site is very interesting – brouk.develop May 09 '19 at 13:21
2 Answers
9
The @
signifies the usage of an "npm scope":
https://docs.npmjs.com/about-scopes
It's basically a way to avoid name clashing, so we could both own modules @cdbrouk/foo
and @jedrichards/foo
. Babel moved to using the @babel
scope a while ago, so the @babel/...
modules are the correct ones to use.

Jed Richards
- 12,244
- 3
- 24
- 35
-
Thank you very very much!!! I recently started study Thank you very much for your help!! – brouk.develop May 09 '19 at 11:41
-
I have changed from "babel-cli" to "@babel/cli" now getting error "babel-node": "babel-node --presets=flow" --- 'babel-node' is not recognized as an internal or external command. – Nadhas Aug 28 '19 at 04:51
-
1
-
I need help, so now how can I run my script from package.json? it's not working if use babel-cli, but when I use @babel/cli is not taking the --ignore argument. – AlfredoDaAs Jun 19 '20 at 02:03
0
if you want that your system recongnize the command babel-node
you should install the dependency @babel/cli
with the global scope:
npm install -g @babel/cli
Otherwise, you should invoque babel-node
via npx: npx babel-node
...

Tyler2P
- 2,324
- 26
- 22
- 31