opkequi.blogg.se

Npm config set prefix
Npm config set prefix





npm config set prefix

In this way, there will be no "xxx is not an internal command" error. Add G:\Software\nodejs (node ​​and npm address) at the end of the "Path" variable of "System Variables"įinally, if the installed global modules need to be run directly on the command line, such as cnpm, webpack, etc., you need to add the previously modified global module path G:\Software\nodejs\node_modules to "Path". (2) After creating NODE_PATH, you also need to tell the system the location of node.js and npm.

npm config set prefix

One advantage of this is that you can clearly know what modules have been installed locally, which is different from the modules installed by default in Node.js. įor example, the following figure shows the effect after installing cnpm globally: Note: There are two node_modules here, because I set the global module path to G:\Software\nodejs\node_modules above, and when npm installs the module globally, it will create a new node_modules folder under this path and install it. Use -json to show the settings in json format. list npm config list Show all the config settings. If no keys are provided, then this command behaves the same as npm config list. My side is: G:\Software\nodejs\node_modules\node_modules. If multiple keys are provided, then the values will be prefixed with the key names. If -g is specified, this will be the value of the global prefix. This is the closest parent directory to contain a package.json file or nodemodules directory, unless -g is also specified. Value is: the node_modules folder under the folder (G:\Software\nodejs\node_modules) created above for storing global modules The absolute path (this tells the system that the global module downloaded by the user is here). npm prefix -g Description Print the local prefix to standard out. in the "system variables", create a new variable named NODE_PATH whose







Npm config set prefix