admin管理员组

文章数量:1332345

I am getting this error while installing any JS package , I have done lots of search but no luck. So please let me know where i am making mistake.

npm ERR! request to failed, reason: error:0906D06C:PEM routines:PEM_read_bio:no start line

WebServer : Apache2(xampp)
Node : v9.3.0
NPM : 5.5.1

I am getting this error while installing any JS package , I have done lots of search but no luck. So please let me know where i am making mistake.

npm ERR! request to https://registry.npmjs/node-modules failed, reason: error:0906D06C:PEM routines:PEM_read_bio:no start line

WebServer : Apache2(xampp)
Node : v9.3.0
NPM : 5.5.1

Share Improve this question edited Jan 25, 2018 at 9:44 Ahmed Ashour 5,56910 gold badges39 silver badges62 bronze badges asked Jan 25, 2018 at 9:24 Mustabshir KhanMustabshir Khan 211 gold badge1 silver badge7 bronze badges 2
  • How are you trying to install the packages? Can you post an example about any package that you tried to install? – Fernando Paz Commented Jan 25, 2018 at 10:14
  • $ npm install -g node-modules any thing wrong with it ? – Mustabshir Khan Commented Jan 25, 2018 at 10:21
Add a ment  | 

2 Answers 2

Reset to default 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 mand the npm will install the packages listed in package.json.

Or

You can run npm config set registry http://registry.npmjs/ so you can run 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:-

  1. check version of your npm with npm -v
  2. run npm -g install npm@<version> This step is important as npm is getting installed globally here.
  3. Now run the mand where you want to install something globally using npm. In my Case the mand was npm install -g @angular/[email protected] which worked fine after these changes
  4. If you are still facing the problem, I would remend to follow the instructions about installing nodejs perfectly from here https://docs.npmjs./try-the-latest-stable-version-of-npm#upgrading-on-windows

本文标签: