Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm或者yarn安装组件时报错 #90

Closed
Liyimei opened this issue Nov 13, 2022 · 1 comment
Closed

npm或者yarn安装组件时报错 #90

Liyimei opened this issue Nov 13, 2022 · 1 comment

Comments

@Liyimei
Copy link

Liyimei commented Nov 13, 2022

报错如下:‘error An unexpected error occurred: "https://registry.npm./@packy-tang%2fvue-tinymce: getaddrinfo ENOTFOUND registry.npm.".
请问有人遇到过同样的问题吗?

@lpreterite
Copy link
Owner

报错如下:‘error An unexpected error occurred: "https://registry.npm./@packy-tang%2fvue-tinymce: getaddrinfo ENOTFOUND registry.npm.". 请问有人遇到过同样的问题吗?

$ npm config list

输入上面命令,看一下你当前配置metrics-registry地址。可能是你源地址配置错了,建议你安装nrm进行npm源的管理。

# 安装
$ npm i -g nrm

# 打印npm源列表
$ nrm ls

  * npm ---------- https://registry.npmjs.org/
    yarn --------- https://registry.yarnpkg.com/
    tencent ------ https://mirrors.cloud.tencent.com/npm/
    cnpm --------- https://r.cnpmjs.org/
    taobao ------- https://registry.npmmirror.com/
    npmMirror ---- https://skimdb.npmjs.com/registry/

# 指定npm源
$ nrm use cnpm

    Registry has been set to: http://r.cnpmjs.org/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants