安装cnpm:

$ npm install -g cnpm --registry=https://registry.npm.taobao.org

配置nodejs的npm安装包路径:

npm config set prefix "node_modules_URL"

npm config set cache "node_cache_URL"

清除之前的配置:

删除C:\Users\Administrator\.npmrc这个文件, .npmrc保存了这些配置信息,有时nodejs发生错误,重新安装时也要先删除这文件和缓冲。

在删除了该文件后,在当前路径下输入:npm root发现提示,安装包路径会安装到当前文件下的node_modules内。


相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
猜你喜欢
  • 2021-05-25
  • 2021-08-15
  • 2021-10-03
  • 2021-11-24
  • 2022-01-18
  • 2021-04-20
  • 2021-04-26
相关资源
相似解决方案