There was an error when installing npm, don’t forget to only configure environment variables, here you need to modify

Recently, when I am building a vue environment, I need to install the Nodejs environment. After installing the environment, I can query the corresponding node and npm versions. This shows that there is almost no problem with the environment configuration.

But the following error occurs when installing other libraries:

The solution to this situation is a two-step process:

1. Delete the .npmrc file under the user (the location is in the user directory of the C drive)
2. Modify the permissions of the node_global and node_cache folders or directly modify the entire parent folder containing node_global and node_cache (it is recommended to directly modify the parent folder, convenient and fast)

Finally, apply and click OK. 

The modified effect is shown below, and the problem is successfully solved!

Guess you like

Origin blog.csdn.net/weixin_52890053/article/details/130718263