-1

What does

npm install -g ...

stand for? I saw this in a tutorial but I don't know what the -g flag does. Does it install from Github?

Thanks.

Xen_mar
  • 8,330
  • 11
  • 51
  • 74

2 Answers2

0

It installs it globally and adds it to the path. This is nice for npm packages that are basically just command-line applications, like yarn.

You can always look up options here https://docs.npmjs.com/cli/install

parktomatomi
  • 3,851
  • 1
  • 14
  • 18
0

-g used to install that npm package globally so that their executable components are available in the system PATH

See the docs on the topic of globally installed packages here.

Aniket
  • 391
  • 5
  • 13