Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how can i solve npm ERR! error:0909006C:PEM in Node.js?

I'm new to Node.js. I tried to add RethinkDB module to my project, but I got: npm error:0909006C:PEM routines:get_name:no start line error.

enter image description here

I don't use a proxy, tried uninstalling/reinstalling Node.js, and changing the registry from the solutions I found online, but none of them worked.

like image 866
serdar Avatar asked Sep 13 '25 00:09

serdar


2 Answers

type this line npm set registry http://registry.npmjs.org/ and after that try again

I assume that your certificate is expired

like image 120
Miguel Yustiz Avatar answered Sep 14 '25 21:09

Miguel Yustiz


that what solved for me on windows ,

cmd:

ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key
# Don't add passphrase
openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub

then on cmd:

more jwtRS256.key

then copy privatekey to your config file , then:

put on every new line:

  /n

before :

    -----BEGIN RSA PRIVATE KEY-----
    MIIJKAIBAAKCAgEAlFVXSZ6llZItgZ0JaiyD7PO3l+b7PPqtt0U3iVyTs0qhEWJB
    Sa7nvyqth2Z+vOVuT5p97GJQ3nMx5CRQsF73YHdFFdUzfIDgFYOiPRT4pAw4l05r

after (on config json):

    "JWTPRIVATEKEY":"-----BEGIN RSA PRIVATE KEY-----\n
    MIIJKAIBAAKCAgEAlFVXSZ6llZItgZ0JaiyD7PO3l+b7PPqtt0U3iVyTs0qhEWJB\n
    Sa7nvyqth2Z+vOVuT5p97GJQ3nMx5CRQsF73YHdFFdUzfIDgFYOiPRT4pAw4l05r\n
    ....d8ul170=\n-----END RSA PRIVATE KEY-----"

then trim spaces:

    "JWTPRIVATEKEY": "-----BEGIN RSA PRIVATE KEY-----\nMI.............d8ul170=\n-----END RSA PRIVATE KEY-----",

then do the same with public key..

 more jwtRS256.key.pub

smile

like image 42
aris Avatar answered Sep 14 '25 19:09

aris



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!