美文网首页
npm安装web3.js

npm安装web3.js

作者: 一分自然卷 | 来源:发表于2017-12-20 16:42 被阅读0次

    安装web3的时候发现用root安装也出现permission denied权限错误:

    gyp ERR! configure error 
    gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/web3/node_modules/scrypt/build'
    gyp ERR! System Darwin 17.0.0
    gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
    gyp ERR! cwd /usr/local/lib/node_modules/web3/node_modules/scrypt
    gyp ERR! node -v v9.3.0
    gyp ERR! node-gyp -v v3.6.2
    gyp ERR! not ok 
    npm ERR! code ELIFECYCLE
    npm ERR! errno 1
    npm ERR! scrypt@6.0.3 install: `node-gyp rebuild`
    npm ERR! Exit status 1
    npm ERR! 
    npm ERR! Failed at the scrypt@6.0.3 install script.
    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /Users/apple/.npm/_logs/2017-12-20T06_16_55_943Z-debug.log
    

    解决方案 : sudo npm install -g web3 --unsafe-perm=true --allow-root

    ETH地址:0xA10137eDA3d4844C6a3B0B51bF650CB115C19577

    相关文章

      网友评论

          本文标题:npm安装web3.js

          本文链接:https://www.haomeiwen.com/subject/cyngwxtx.html