Home > Web Front-end > JS Tutorial > body text

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

php中世界最好的语言
Release: 2018-05-21 14:32:20
Original
3409 people have browsed it

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

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!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!