Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 2
    You should never have to use sudo with npm. Try using nvm to manage your node versions. Commented Nov 17, 2017 at 16:20
  • 1
    npm install -g babel-cli Will work without sudo. Commented Dec 1, 2017 at 20:53
  • 3
    you should use sudo with npm install -g babel-cli to access this file /usr/local/lib/node_modules, else you'll be denied.
    – Ericgit
    Commented Jul 20, 2019 at 22:41
  • The @babel/cli docs recommends against installing babel-cli globally (to avoid conflicts with other projects using different versions of babel, and to improve portability)
    – 7hibault
    Commented Jun 29, 2020 at 10:23