首页 > 安装phonegap报错

安装phonegap报错

npm install -g phonegap@latest

Last login: Sun May  8 00:23:03 on ttys001
tangdeMacBook-Pro:~ tang$ npm install -g phonegap@latest
npm ERR! tar.unpack untar error /Users/tang/.npm/phonegap/6.2.1/package.tgz
npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "phonegap@latest"
npm ERR! node v4.4.2
npm ERR! npm  v2.15.0
npm ERR! path /usr/local/lib/node_modules/phonegap
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/phonegap'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/phonegap']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/phonegap',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/phonegap',
npm ERR!   fstream_class: 'DirWriter',
npm ERR!   fstream_stack: 
npm ERR!    [ '/usr/local/lib/node_modules/npm/node_modules/fstream/lib/dir-writer.js:35:25',
npm ERR!      '/usr/local/lib/node_modules/npm/node_modules/mkdirp/index.js:47:53',
npm ERR!      'FSReqWrap.oncomplete (fs.js:82:15)' ] }
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/tang/npm-debug.log
tangdeMacBook-Pro:~ tang$ 

切换管理员账号安装

【热门文章】
【热门文章】