This time I will show you how to modify the npm global module uninstallation and default installation directory, and what are the precautions for modifying the npm global module uninstallation and default installation directory, as follows: This is a practical case, let’s take a look at it.
Uninstall the globally installed module npm uninstall -g
After uninstalling, you can go to the /node_modules/ directory to check whether the package still exists, or Use the following command to view: npm ls
For npm instructions, you still need to read more English documents, such as https://docs.npmjs.com/.
View all globally installed modules npm ls -g
View npm default settings (part) npm config ls
View npm default settings (all) npm config ls -l
As shown in the figure, you can see that global modules are installed by default in the prefix directory C :\Users\ZjuTH\AppData\Roaming\npm
So how to modify the path?
Use the command npm config set prefix "D:\Program Files\npm_global_modules\node_modules"
I believe you have mastered the method after reading the case in this article, please come for more exciting information Pay attention to other related articles on php Chinese website!
Recommended reading:
WeChat Mini Program Quick Start
##How to use the http server in angularjs
The above is the detailed content of How to modify npm global module uninstallation and default installation directory. For more information, please follow other related articles on the PHP Chinese website!