问题
I'm receiving the following errors when trying to install express:
npm ERR! code ERR_OSSL_PEM_NO_START_LINEnpm ERR! errno ERR_OSSL_PEM_NO_START_LINEnpm ERR! request to https://registry.npmjs.org/express failed, reason: error:0909006C:PEM routines:get_name:no start line
回答1:
Type this command
npm set registry http://registry.npmjs.org/
and after that try again
npm install express
as per this issue it is a certificate related problem
回答2:
I also had a problem like that... and looking around for various solutions on the internet I tried a few of these:
- Try
npm installto another repository - Try install another version of node.js
npm set registry http://registry.npmjs.org/
If the above method still fails. You can try these:
- Uninstall nodejs from Programs & Features with the uninstaller.
- Delete these files:
C:\Program Files (x86)\NodejsC:\Program Files\NodejsC:\Users\{User}\AppData\Roaming\npmC:\Users\{User}\AppData\Roaming\npm-cacheC:\Users\{User}\.npmrc(and possibly check for that without the.prefix too)
- Reboot, for good measure
- Try too install node.js again
- Try too
nmp installto destination repository
Good luck... with what I mentioned above, I was able to solve the problem with my setup.
来源:https://stackoverflow.com/questions/57194920/cant-install-express-because-npm-install-express-error