npm安装etherlime失败

时间:2019-01-07 08:08:06

标签: npm npm-install

我正在尝试在etherlimeUbuntu 16.04上安装npm 6.5.0

sudo npm install etherlime

即使我使用sudo运行以上命令,它也会给我这个错误:

npm ERR! code 1
npm ERR! Command failed: /usr/bin/git clone --depth=1 -q -b master git://github.com/LimeChain/solidity-coverage.git /home/username/.npm/_cacache/tmp/git-clone-823333ab
npm ERR! /home/username/.npm/_cacache/tmp/git-clone-823333ab/.git: Permission denied
npm ERR! 

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/username/.npm/_logs/2019-01-07T08_00_45_775Z-debug.log

2 个答案:

答案 0 :(得分:0)

我从没有使用过乙醚,但是在使用npm命令时,您不需要使用sudo。也许npm安装错误,或者由于目录权限而导致错误。 试试这个: sudo chown -R username directory

我需要错误日志来了解问题所在,但是请记住在子目录中而不是用户主目录中使用npm。

mkdir folderName
cd folderName
npm install etherlime

您会发现此answer有用。

显然,在尝试此操作之前,您必须全局安装etherlime(npm install -g etherlime

答案 1 :(得分:0)

尝试这个

$input = "AzzzzB";
echo $input ."\n";
$arr = str_split($input);

for ($i=0; $i < count($arr); $i++) {
    if ($arr[$i] == 'A') {
        $arr[$i] = 'B';
    }
    else if ($arr[$i] == 'B') {
        $arr[$i] = 'A';
    }
}
$output = implode('', $arr);
echo $ouput;

AzzzzB
BzzzzA

或引用此链接https://www.npmjs.com/package/etherlime

相关问题