Search code examples
node.jsbabel-cli

What is the difference between babel-cli and @babel/cli?


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 @?


Solution

  • 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.