Can't install express because npm install express error

最后都变了- 提交于 2020-04-16 03:17:12

问题


I'm receiving the following errors when trying to install express:

  1. npm ERR! code ERR_OSSL_PEM_NO_START_LINE
  2. npm ERR! errno ERR_OSSL_PEM_NO_START_LINE
  3. npm 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 install to 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:

  1. Uninstall nodejs from Programs & Features with the uninstaller.
  2. Delete these files:
    • C:\Program Files (x86)\Nodejs
    • C:\Program Files\Nodejs
    • C:\Users\{User}\AppData\Roaming\npm
    • C:\Users\{User}\AppData\Roaming\npm-cache
    • C:\Users\{User}\.npmrc (and possibly check for that without the . prefix too)
  3. Reboot, for good measure
  4. Try too install node.js again
  5. Try too nmp install to 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!