nodejs的npm修改源
nodejs的npm修改源
2022-03-06 0 评论 0 阅读 0 点赞

nodejs的npm修改源

daimafengzi
2022-03-06 / 0 评论 / 0 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2022年03月05日,已超过1600天没有更新,若内容或图片失效,请留言反馈。

在国内用npm install时,速度总是不尽如人意,解决办法是修改npm的数据源

npm config set registry https://registry.npm.taobao.org

修改后可以通过这个进行测试

npm config get registry

如果更改好了之后提示错误。

Nothing to stop. No server is running for the store at /root/.pnpm-store/v3
 ERROR  This modules directory was created using the following registries configuration: {"default":"https://registry.npm.taobao.org/"}. The current configuration is {"default":"https://registry.npmjs.org/"}. To recreate the modules directory using the new settings, run "pnpm install"

解决办法:运行

pnpm install -g
0

评论 (0)

取消