【问题标题】:EACCESS Error when doing npm install -g bower执行 npm install -g bower 时出现 EACCESS 错误
【发布时间】:2014-10-17 20:35:41
【问题描述】:

当我使用 -g(全局)安装运行命令时,我收到 EACCESS 错误。我阅读了堆栈溢出答案之一,我应该使用 'sudo chown -R whoami ~/.npm' 以本地/root 管理员身份运行,但它没有帮助

npm ERR!   errno: 3,
npm ERR!   code: 'EACCES',
npm ERR!   path: '/Users/.node/lib/node_modules/bower/.editorconfig' 
npm ERR! Please try running this command again as root/Administrator.
npm ERR! System Darwin 13.3.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "bower"
npm ERR! cwd /Users/Documents/tutorials/bookingappdemo
npm ERR! node -v v0.10.29
npm ERR! npm -v 2.0.0-alpha-5
npm ERR! path /Users/.node/lib/node_modules/bower/.editorconfig
npm ERR! code EACCES
npm ERR! errno 3
npm ERR! stack Error: EACCES, unlink '/Users/.node/lib/node_modules/bower/.editorconfig'
npm ERR! Additional logging details can be found in:
npm ERR! not ok code 0

【问题讨论】:

    标签: node.js npm bower mean-stack


    【解决方案1】:
    I used --unsafe-perm with install e.g  
    sudo npm install -g learnyounode --unsafe-perm
    

    这帮助我安装时没有权限错误,希望尽快修复。

    【讨论】:

      【解决方案2】:

      如果您是管理员,我建议您以 root 身份运行命令: sudo npm install -g bower

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2019-05-16
        • 1970-01-01
        • 2013-09-17
        • 2017-04-25
        • 1970-01-01
        • 2021-03-15
        • 1970-01-01
        相关资源
        最近更新 更多