【问题标题】:Cannot Install NPM Package - Code 128 An unknown git error occurred无法安装 NPM 包 - 代码 128 发生未知 git 错误
【发布时间】:2022-08-23 06:11:56
【问题描述】:

我正在尝试安装软件包 @truffle/hdwallet-provider

正如文档中所写,我正在运行:

npm i @truffle/hdwallet-provider

这是我收到的错误消息:

npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://git@github.com/ethereumjs/ethereumjs-abi.git
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! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-03-08T14_13_15_122Z-debug-0.log

以下是日志:

698 verbose Linux 5.13.0-30-generic
699 verbose argv \"/usr/bin/node\" \"/usr/bin/npm\" \"i\" \"@truffle/hdwallet-provider\"
700 verbose node v14.17.6
701 verbose npm  v8.5.3
702 error code 128
703 error An unknown git error occurred
704 error command git --no-replace-objects ls-remote ssh://git@github.com/ethereumjs/ethereumjs-abi.git
705 error git@github.com: Permission denied (publickey).
705 error fatal: Could not read from remote repository.
705 error
705 error Please make sure you have the correct access rights
705 error and the repository exists.
706 verbose exit 128
707 timing npm Completed in 6266ms
708 verbose unfinished npm timer reify 1646748520075
709 verbose unfinished npm timer reify:loadTrees 1646748520084
710 verbose code 128
711 error A complete log of this run can be found in:
711 error     /root/.npm/_logs/2022-03-08T14_08_39_958Z-debug-0.log

我的节点版本:

v14.17.6

我的 NPM 版本:

v8.5.3

    标签: node.js npm package npm-install truffle


    【解决方案1】:

    实际上,这是一个众所周知的错误。 https://github.com/trufflesuite/truffle/issues/2852

    使用它解决了问题:

    npm i @truffle/hdwallet-provider@next
    

    【讨论】:

      【解决方案2】:

      对于其他人来这里使用另一个包的相同错误,请查看此 SO 帖子:

      npm install error code 128

      【讨论】:

        猜你喜欢
        • 2016-05-03
        • 2019-10-26
        • 2014-08-20
        • 2019-11-03
        • 1970-01-01
        • 2022-06-28
        • 1970-01-01
        • 1970-01-01
        • 2019-08-20
        相关资源
        最近更新 更多