pnpm报错、访问超时的问题

作者:linkyang
标签:npm
发布时间:2024年05月26日 02:18:33
更新时间:2025年02月27日 02:18:33

由于registry.npmjs.org 被 GFW 屏蔽,所以在使用pnpm命令的时候会报错: Error when performing the request to httpsregistry.npmjs.orgpnpm; for troubleshooting help, see httpsgithub.comnodejscorepack#troubleshooting。我们可以将官方仓库地址替换为国内其他的镜像地址。

打开cmd命令窗口执行如下:

bash
setx COREPACK_NPM_REGISTRY https://registry.npmmirror.com

这样就将仓库地址替换为国内的阿里镜像,此时访问将不再超时。

登录后可查看并参与评论

Gitee 登录

目录导航

暂无目录