[英]npm ERR! request to https://registry.npmjs.org/node-modules failed, reason: error:0906D06C:PEM routines:PEM_read_bio:no start line
I am getting this error while installing any JS package , I have done lots of search but no luck.我在安装任何 JS 包时遇到此错误,我进行了大量搜索但没有运气。 So please let me know where i am making mistake.所以请让我知道我哪里出错了。
npm ERR! npm 错误! request to https://registry.npmjs.org/node-modules failed, reason: error:0906D06C:PEM routines:PEM_read_bio:no start line对https://registry.npmjs.org/node-modules 的请求失败,原因:错误:0906D06C:PEM 例程:PEM_read_bio:没有起始行
WebServer : Apache2(xampp)网络服务器:Apache2(xampp)
Node : v9.3.0节点:v9.3.0
NPM : 5.5.1净资产管理:5.5.1
I think that first you need to start prompt as an administrator, then run npm cache clean -f
then try to run npm install
, by this command the npm will install the packages listed in package.json.我认为首先您需要以管理员身份启动提示,然后运行npm cache clean -f
然后尝试运行npm install
,通过此命令,npm 将安装 package.json 中列出的包。
Or或者
You can run npm config set registry http://registry.npmjs.org/
so you can run npm install -g node-modules
.你可以运行npm config set registry http://registry.npmjs.org/
这样你就可以运行npm install -g node-modules
。 Read more in this answer .在这个答案中阅读更多内容。
I faced the same problem and finally I was able to solve the exact above error by doing the following steps:-我遇到了同样的问题,最后我能够通过执行以下步骤来解决上述错误:-
npm -g install npm@<version>
This step is important as npm is getting installed globally here.运行npm -g install npm@<version>
这一步很重要,因为 npm 是在这里全局安装的。npm install -g @angular/cli@6.2.9
which worked fine after these changes在我的情况下,命令是npm install -g @angular/cli@6.2.9
在这些更改后工作正常
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.