NPM Install Fails - error:0906D06C:PEM routines:PE

2019-08-05 01:41发布

问题:

I am attempting to install the expo package from npm, but during the install process, I receive an error, error:0906D06C:PEM routines:PEM_read_bio:no start line, multiple times as it tries to fetch .tar.gz files, and then the installation fails.

I looked around, but all I have been able to find is examples of that error when people were setting up their own servers and had issues with their certs. But I'm not trying to set up a server, I'm trying to download a package, I don't have any certs to fix. I looked at my id_rsa file in my ~/.ssh directory, and it appeared to be well formed with a start and end delimiter.

I thought this might be an issue with the package, but I had a colleague attempt to install the package and it worked for them.

Any idea what I am doing wrong? I suspect it is an issue with my npm installation or configuration but I am at a loss as to what should be changed.

npm debug log

Here is the complete output:

Nathaniels-MacBook-Pro:testexpo kiddynamo$ node -v
v6.11.0
Nathaniels-MacBook-Pro:testexpo kiddynamo$ npm -v
3.10.10
Nathaniels-MacBook-Pro:testexpo kiddynamo$ npm install --save expo
npm ERR! fetch failed https://github.com/callstack-io/react-native-fbads/tarball/v4.1.0
npm WARN retry will retry, error on last attempt: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR! fetch failed https://github.com/expo/react-native-svg/archive/5.2.0-exp.0.tar.gz
npm WARN retry will retry, error on last attempt: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR! fetch failed https://github.com/expo/react-native-maps/archive/v0.15.2.tar.gz
npm WARN retry will retry, error on last attempt: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR! fetch failed https://github.com/callstack-io/react-native-fbads/tarball/v4.1.0
npm WARN retry will retry, error on last attempt: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR! fetch failed https://github.com/expo/react-native-svg/archive/5.2.0-exp.0.tar.gz
npm WARN retry will retry, error on last attempt: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR! fetch failed https://github.com/expo/react-native-maps/archive/v0.15.2.tar.gz
npm WARN retry will retry, error on last attempt: Error: error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR! fetch failed https://github.com/callstack-io/react-native-fbads/tarball/v4.1.0
npm ERR! fetch failed https://github.com/expo/react-native-svg/archive/5.2.0-exp.0.tar.gz
npm ERR! fetch failed https://github.com/expo/react-native-maps/archive/v0.15.2.tar.gz
npm ERR! Darwin 16.6.0
npm ERR! argv "/Users/kiddynamo/.nvm/versions/node/v6.11.0/bin/node" "/Users/kiddynamo/.nvm/versions/node/v6.11.0/bin/npm" "install" "--save" "expo"
npm ERR! node v6.11.0
npm ERR! npm  v3.10.10

npm ERR! error:0906D06C:PEM routines:PEM_read_bio:no start line
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/kiddynamo/git/barback/testexpo/npm-debug.log

回答1:

I was finally able to find a solution to the issue. Uninstalling Node via NVM and deleting my ~/.nvm, ~/.npm, ~/.node-gyp, and ~/.node_repl_history directories, then reinstalling Node fixed the issue. Not 100% sure why but hopefully this is helpful to anyone experiencing the same issue.