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
- 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
2 Answers
Reset to default 1I 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:-
- check version of your npm with npm -v
- run
npm -g install npm@<version>
This step is important as npm is getting installed globally here. - 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 - 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