美文网首页
Mac OSX,安装 NPM 过程中报错

Mac OSX,安装 NPM 过程中报错

作者: 范Ray | 来源:发表于2017-03-16 22:09 被阅读0次
    npm ERR! Darwin 15.6.0
    npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "cnpm" "--registry=https://registry.npm.taobao.org"
    npm ERR! node v6.10.0
    npm ERR! npm  v3.10.10
    npm ERR! path /usr/local/lib/node_modules
    npm ERR! code EACCES
    npm ERR! errno -13
    npm ERR! syscall access
    
    npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
    npm ERR!     at Error (native)
    npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
    npm ERR!     at Error (native)
    npm ERR!   errno: -13,
    npm ERR!   code: 'EACCES',
    npm ERR!   syscall: 'access',
    npm ERR!   path: '/usr/local/lib/node_modules' }
    npm ERR! 
    npm ERR! Please try running this command again as root/Administrator.
    
    npm ERR! Please include the following file with any support request:
    npm ERR!     /Users/FanLei/npm-debug.log
    

    解决方法:如下
    命令行下执行: sudo npm install -g cnpm --registry=https://registry.npm.taobao.org

    相关文章

      网友评论

          本文标题:Mac OSX,安装 NPM 过程中报错

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