what does the “-g” flag do in the command “npm install -g ”?

前端 未结 3 905
耶瑟儿~
耶瑟儿~ 2020-12-29 00:48

I\'m following examples that use the -g flag when using npm install but I can\'t figure out through the help system what the -g flag i

3条回答
  •  伪装坚强ぢ
    2020-12-29 01:41

    If you do npm help install you will see that:

      o   npm install (in package directory, no arguments):
    
          Install the dependencies in the local node_modules folder.
    
          In global mode (ie, with -g or --global appended  to  the  com-
          mand), it installs the current package context (ie, the current
          working directory) as a global package.
    

提交回复
热议问题