Mustabshir Khan
Mustabshir Khan

Reputation: 21

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. So please let me know where i am making mistake.

npm ERR! request to https://registry.npmjs.org/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

Upvotes: 2

Views: 22219

Answers (2)

Noor U Din
Noor U Din

Reputation: 11

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 command where you want to install something globally using npm. In my Case the command was npm install -g @angular/[email protected] which worked fine after these changes
  4. If you are still facing the problem, I would recommend to follow the instructions about installing nodejs perfectly from here https://docs.npmjs.com/try-the-latest-stable-version-of-npm#upgrading-on-windows

Upvotes: 1

Fernando Paz
Fernando Paz

Reputation: 623

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.

Or

You can run npm config set registry http://registry.npmjs.org/ so you can run npm install -g node-modules. Read more in this answer.

Upvotes: 1

Related Questions