-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
  • 6,361
  • 7
  • 34
  • 51

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,611
  • 1
  • 13
  • 15
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
  • 343
  • 4
  • 13