Home > Article > Web Front-end > How to change default global path using npm
This time I will show you how to use npm to change the default global path, and what are the precautions for using npm to change the default global path. The following is a practical case, let's take a look.
Command line mode
npm changes the default global path and cache pathnpm config set prefix new pathnpm config set cache new pathnpm config set registryhttps://registry.npm.taobao.org
View Change the result
npm config ls -l or npm config list Add file .npmrc in the user's home directoryAdd file content
registry=https://registry.npm.taobao.org/ prefix=e:\nodejs\npm_global cache=e:\nodejs\npm_cacheI believe you have mastered the method after reading the case in this article. For more exciting content, please pay attention to php Chinese Other related articles online! Recommended reading:
How to use AngularJS to implement tab switching
How to use Koa2 to develop WeChat 2D Scan the QR code to pay
The above is the detailed content of How to change default global path using npm. For more information, please follow other related articles on the PHP Chinese website!