1 year ago

#273237

test-img

user2818066

AWS certificate error when installing npm to start peerjs server

I am trying to install peerjs server in Amazon AWS elastic beanstalk EC2 instance. I tried to use the following commands to do it. But I got certificate error.

sudo yum -y --enablerepo=epel install nodejs npm             (note: step 1) 
## export NODE_EXTRA_CA_CERTS=/tmp/zzzww/myca.crt (note: step 2, Do I need this?)
sudo npm i peer  -g                                          (note: step 3) 
sudo peerjs --port 9000 --key peerjs --path /tmp/vidapp        

In step 3, I got the following error. What is the correct procedures and commands to install and run peerjs server in AWS?

ERR! Error: UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR!     at SecurePair.<anonymous> (tls.js:1430:32)
npm ERR!     at SecurePair.emit (events.js:92:17)
npm ERR!     at SecurePair.maybeInitFinished (tls.js:1029:10)
npm ERR!     at CleartextStream.read [as _read] (tls.js:521:13)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:341:10)
npm ERR!     at EncryptedStream.write [as _write] (tls.js:418:25)
npm ERR!     at doWrite (_stream_writable.js:226:10)
npm ERR!     at writeOrBuffer (_stream_writable.js:216:5)
npm ERR!     at EncryptedStream.Writable.write (_stream_writable.js:183:11)
npm ERR!     at write (_stream_readable.js:602:24)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 4.14.193-113.317.amzn1.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "peer"
npm ERR! cwd /tmp/zzzww
npm ERR! node -v v0.10.48
npm ERR! npm -v 1.3.6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /tmp/zzzww/npm-debug.log
npm ERR! not ok code 0

amazon-elastic-beanstalk

npm-install

peerjs

peer

0 Answers

Your Answer

Accepted video resources