Home Web Front-end JS Tutorial Detailed explanation of the steps to uninstall npm global modules and modify the default installation directory

Detailed explanation of the steps to uninstall npm global modules and modify the default installation directory

May 21, 2018 pm 02:32 PM
uninstall Install default

This 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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot Article Tags

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to uninstall wps document How to uninstall wps document Mar 20, 2024 pm 02:01 PM

How to uninstall wps document

Solution to the problem that Win11 system cannot install Chinese language pack Solution to the problem that Win11 system cannot install Chinese language pack Mar 09, 2024 am 09:48 AM

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

Unable to install guest additions in VirtualBox Unable to install guest additions in VirtualBox Mar 10, 2024 am 09:34 AM

Unable to install guest additions in VirtualBox

What should I do if Baidu Netdisk is downloaded successfully but cannot be installed? What should I do if Baidu Netdisk is downloaded successfully but cannot be installed? Mar 13, 2024 pm 10:22 PM

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 uninstall Quark Network Disk? How to completely uninstall Quark Network Disk Mar 14, 2024 am 08:52 AM

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

How to install Android apps on Linux? How to install Android apps on Linux? Mar 19, 2024 am 11:15 AM

How to install Android apps on Linux?

The latest solution to the problem that Office is not cleanly uninstalled and cannot be reinstalled The latest solution to the problem that Office is not cleanly uninstalled and cannot be reinstalled Mar 13, 2024 pm 04:31 PM

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 How to uninstall software from Tencent QQ Security Manager - How to uninstall software from Tencent QQ Security Manager Mar 05, 2024 am 11:52 AM

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

See all articles