


Detailed explanation of the steps to uninstall npm global modules and modify the default installation directory
May 21, 2018 pm 02:32 PMThis time I will bring you a detailed explanation of the steps for uninstalling npm global modules and modifying the default installation directory. What are the precautions for uninstalling npm global modules and modifying the default installation directory? The following are Let’s take a look at practical cases.
Uninstall the globally installed module npm uninstall -g <package>
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:
vue:src file path error problem how to deal with it
Tomcat refreshes when Vue project webpack is packaged and deployed How to deal with 404 errors
The above is the detailed content of Detailed explanation of the steps to uninstall npm global modules and modify the default installation directory. For more information, please follow other related articles on the PHP Chinese website!

Hot Article

Hot tools Tags

Hot Article

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Solution to the problem that Win11 system cannot install Chinese language pack

Unable to install guest additions in VirtualBox

What should I do if Baidu Netdisk is downloaded successfully but cannot be installed?

How to uninstall Quark Network Disk? How to completely uninstall Quark Network Disk

How to install Android apps on Linux?

The latest solution to the problem that Office is not cleanly uninstalled and cannot be reinstalled

How to uninstall software from Tencent QQ Security Manager - How to uninstall software from Tencent QQ Security Manager
