请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

在server下执行 npm install报错

图片描述图片描述
The authenticity of host ‘github.com (20.205.243.166)’ can’t be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
npm ERR! git clone --template=/home/u/.npm/_git-remotes/_templates --mirror git@github.com:versatica/mediasoup.git /home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44: 克隆到纯仓库 ‘/home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44’…
npm ERR! git clone --template=/home/u/.npm/_git-remotes/_templates --mirror git@github.com:versatica/mediasoup.git /home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44: Warning: Permanently added ‘github.com,20.205.243.166’ (ECDSA) to the list of known hosts.
npm ERR! git clone --template=/home/u/.npm/_git-remotes/_templates --mirror git@github.com:versatica/mediasoup.git /home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44: git@github.com: Permission denied (publickey).
npm ERR! git clone --template=/home/u/.npm/_git-remotes/_templates --mirror git@github.com:versatica/mediasoup.git /home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44: fatal: 无法读取远程仓库。
npm ERR! git clone --template=/home/u/.npm/_git-remotes/_templates --mirror git@github.com:versatica/mediasoup.git /home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44:
npm ERR! git clone --template=/home/u/.npm/_git-remotes/_templates --mirror git@github.com:versatica/mediasoup.git /home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44: 请确认您有正确的访问权限并且仓库存在。
npm ERR! Linux 5.4.0-107-generic
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” "install"
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! code 128

npm ERR! Command failed: git clone --template=/home/u/.npm/_git-remotes/_templates --mirror git@github.com:versatica/mediasoup.git /home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44
npm ERR! 克隆到纯仓库 ‘/home/u/.npm/_git-remotes/git-github-com-versatica-mediasoup-git-v3-d2058d44’…
npm ERR! Warning: Permanently added ‘github.com,20.205.243.166’ (ECDSA) to the list of known hosts.
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: 无法读取远程仓库。
npm ERR!
npm ERR! 请确认您有正确的访问权限并且仓库存在。
npm ERR!
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! /home/u/mediasoup-demo/server/npm-debug.log

正在回答 回答被采纳积分+3

1回答

李超 2022-04-07 20:30:14

你直接执行出错的这条命令看看能执行成功吗

0 回复 有任何疑惑可以回复我~
  • 提问者 IEMc #1
    老师 这个报错是成功了吗
    npm ERR! Linux 5.4.0-107-generic
    npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "-g" "cnpm" "--registry=https://registry.npm.taobao.org"
    npm ERR! node v8.10.0
    npm ERR! npm  v3.5.2
    npm ERR! path /usr/local/lib/node_modules/.staging/ansi-regex-5d5795cb
    npm ERR! code ENOENT
    npm ERR! errno -2
    npm ERR! syscall rename
    
    npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/ansi-regex-5d5795cb' -> '/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/ansi-regex'
    npm ERR! enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/ansi-regex-5d5795cb' -> '/usr/local/lib/node_modules/cnpm/node_modules/npm/node_modules/ansi-regex'
    npm ERR! enoent This is most likely not a problem with npm itself
    npm ERR! enoent and is related to npm not being able to find a file.
    npm ERR! enoent 
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /home/u/Downloads/nodejs/bin/mediasoup-demo/app/npm-debug.log
    回复 有任何疑惑可以回复我~ 2022-04-08 10:21:32
  • 提问者 IEMc #2
    我的server/和app/文件夹下面没有node_modules和certs文件
    回复 有任何疑惑可以回复我~ 2022-04-08 10:23:30
  • 提问者 IEMc #3
    这是安装的版本
    npm 已经是最新版 (3.5.2-0ubuntu4)。
    nodejs 已经是最新版 (8.10.0~dfsg-2ubuntu0.4)。
    回复 有任何疑惑可以回复我~ 2022-04-08 11:05:26
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号