What does this mean for npm install -g

Just a beginners question, I'm trying to install the platform Lessfrom Node.js. command line npm install -g less. I check the document from here

In global mode (i.e. with -g or --global added to the command), this sets the current package context (i.e. the current working directory) as the global package.

What does the global package mean? thank.

+4
source share
3 answers

You do not need to install Less as global, the Less ReadMe : instruction npm install less.


, , (, , npm install).

, Node.js( ) .

. , , , Node.js.


, , , , , .

+6

: https://nodejs.org/en/blog/npm/npm-1-0-global-vs-local-installation/

npm:

. {prefix}/lib/ node_modules {}/bin, {} /usr/local, man- {prefix}/share/man, .

. . Node . /node_modules, . /node_modules/.bin/, man- arent .

+1

It just means that the package you install will be available / integrated across the entire Nodejs platform.

0
source

Source: https://habr.com/ru/post/1547384/


All Articles