node.js - windows10下的npm全局路径的复原或者将npm彻底删除?
ringa_lee
ringa_lee 2017-04-17 15:50:53
0
3
655

windows10系统,之前嫌每次全局安装和查询路径都不匹配,于是照着网上的教程改了一下:
1.把npmrc这个文件里的prefix和cache改成了自己的想要的路径:指向了在E盘新建了node-cache和node-global的两个文件夹
2.在git bash中使用npm config set 命令将prefix和cache路径又改了一遍(与1中相同)
3.在系统的环境变量中添加了NODE_PATH文件夹所在路径
然后现在无论是全局还是本地都不好使了,我再全局安装gulp然后在本地文件夹也安装了,但是在git bash里面显示bash:gulp:command not found,单纯卸载npm和nodejs再重新安装没有效果,npm root -g什么的路径没有改变,其他的路径也还会保留之前的设置,想请问一下如何彻底卸载或者有什么解决办法吗?
感谢回复。。折腾了好久也不见效果。。。

ringa_lee
ringa_lee

ringa_lee

reply all(3)
刘奇

After adding NODE_PATH to the environment variable, the Path should also be changed to "D:nodejsnode_global", so that your new directory should be usable

But the directory cannot be deleted, please ask

伊谢尔伦

Is the problem solved? After I installed npm, I also set up cache and global, and also specified install -g during installation. But after the installation is completed, it is always in the user directory of the C drive, not in the specified directory. And for example, if you install express, you will get the message "cannot find modules" when using express

伊谢尔伦

Just install nvm-windows

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template