git npm WARN 注册表 https://registry.npmjs.org/ 的意外警告:

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/52068565/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:10:47  来源:igfitidea点击:

npm WARN registry Unexpected warning for https://registry.npmjs.org/:

gitnpmterminalnpm-install

提问by kyrolos magdy

guys I am facing a strange problem here that my git-bash and my terminal when I am trying to use npm install I git this error my error message

伙计们,我在这里面临一个奇怪的问题,当我尝试使用 npm install 时,我的 git-bash 和终端出现了这个错误,我的错误消息

some guy told me to clear my caches and I did so my case just changed and now I git no error message the installing process is never done and I git some thing like this the second error message

有人告诉我清除缓存,我这样做了,所以我的情况发生了变化,现在我没有错误消息,安装过程从未完成,我在第二条错误消息中给出了类似东西

回答by Ragavan Rajan

Step 1: Delete package-lock.jsonfile from your project

第 1 步:package-lock.json从项目中删除文件

Step 2: If your npm version is 5 and above. Then run the following command

第 2 步:如果您的 npm 版本是 5 及以上。然后运行以下命令

npm cache verify

Step 3: Then run your parcel bunder

第 3 步:然后运行您的包裹包

npm install -g parcel-bundler  

or

或者

npm install --save-dev parcel-bundler babel-preset-env 

Hopefully it should work.

希望它应该工作。

回答by UA_

I got this error when I try to install prisma globally, I solved this

当我尝试全局安装prisma时出现此错误,我解决了这个问题

1> npm cache clear --force

1> npm cache clear --force

2> npm install npm

2> npm install npm

回答by chetana bhilawadi

I have also faced the same issue ("Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/@angular%2fclifailed, reason: connect ETIMEDOUT 104.16.22.35:443")

我也遇到了同样的问题(“ https://registry.npmjs.org/ 的意外警告:杂项警告 ETIMEDOUT:对https://registry.npmjs.org/@angular%2fcli 的请求失败,原因:连接 ETIMEDOUT 104.16 .22.35:443")

Solution:

解决方案:

Step 1: Delete package-lock.json file from your project

步骤 1:从项目中删除 package-lock.json 文件

Step 2: If your npm version is 5 and above. Then run the following command

第 2 步:如果您的 npm 版本是 5 及以上。然后运行以下命令

npm cache verify

npm 缓存验证

Step 3: Then run your parcel bunder

第 3 步:然后运行您的包裹包

npm install -g parcel-bundler

npm install -g parcel-bundler

Then finally, It was showing the "Network Connectivity" issue...!!!

最后,它显示了“网络连接”问题......!!!

enter image description here

在此处输入图片说明

回答by Somit Meshram

Step 1: Try to clear the cache first using

第 1 步:尝试首先使用清除缓存

     npm cache clear --force

Step 2: Try to install again

第 2 步:再次尝试安装

    npm install -g @angular/cli

回答by Njibbs

Downgrade npm to v4.6.1.

将 npm 降级到 v4.6.1。

npm install npm@4

npm install npm@4

Version >= 5 is unstable.

版本 >= 5 不稳定。