如何解决使用 `npm i curlconverter` 安装公共包会导致 `fatal: could not read from remote repository`
github 上已经有一个关于此的问题,但是提出的解决方案并没有解决问题。我也不知道这是否是库中的错误。
$ npm i curlconverter
npm ERR! Error while executing:
npm ERR! /usr/bin/git ls-remote -h -t ssh://git@github.com/NickCarneiro/yargs-ansi.git
npm ERR!
npm ERR! git@github.com: Permission denied (publickey).
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR! exited with error code: 128
npm ERR! A complete log of this run can be found in:
npm ERR! /home/user/.npm/_logs/2021-05-17T14_07_32_675Z-debug.log
我可以通过安装旧版本在本地安装 curlconverter
:
npm install --save yargs
npm install --save curlconverter@3.12.0
但是,如果我在 Dockerfile 中执行此操作,它仍然会出错:
Step 6/9 : RUN npm install --save curlconverter@3.12.0
---> Running in 2f5e6c7af7ce
npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT
npm ERR! enoent Error while executing:
npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/NickCarneiro/yargs.git
npm ERR! enoent
npm ERR! enoent
npm ERR! enoent spawn git ENOENT
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-05-17T14_06_02_821Z-debug.log
The command '/bin/sh -c npm install --save curlconverter@3.12.0' returned a non-zero code: 1
这里有什么问题,有什么安装和使用包的方法吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。