安装错误bower yo gulp

时间:2016-04-07 04:59:11

标签: git npm gulp bower yo

当我尝试安装软件包时,我遇到了一大堆错误(需要帮助,如果你发出命令,请详细解释那些实际意味着什么,他们会做什么?) 提前致谢

npm install -g yo gulp bower

npm ERR! tar.unpack untar error /Users/Research/.npm/yo/1.7.0/package.tgz
npm ERR! tar.unpack untar error /Users/Research/.npm/gulp/3.9.1/package.tgz
npm ERR! Darwin 15.0.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yo" "gulp" "bower"
npm ERR! node v4.2.6
npm ERR! npm  v2.14.12
npm ERR! path /usr/local/lib/node_modules/yo
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir

npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/yo'
npm ERR!     at Error (native)
npm ERR!  { [Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/yo']
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'mkdir',
npm ERR!   path: '/usr/local/lib/node_modules/yo',
npm ERR!   fstream_type: 'Directory',
npm ERR!   fstream_path: '/usr/local/lib/node_modules/yo',
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! error rolling back Error: EACCES: permission denied, unlink '/usr/local/bin/bower'
npm ERR! error rolling back     at Error (native)
npm ERR! error rolling back  { [Error: EACCES: permission denied, unlink '/usr/local/bin/bower']
npm ERR! error rolling back   errno: -13,
npm ERR! error rolling back   code: 'EACCES',
npm ERR! error rolling back   syscall: 'unlink',
npm ERR! error rolling back   path: '/usr/local/bin/bower' }

npm ERR! Please include the following file with any support request:
npm ERR!     /Applications/MAMP/htdocs/hackathon/para/HA-1.3.0/npm-debug.log

bower install

bower not-cached    https://github.com/angular/bower-angular.git#1.5.0
bower resolve       https://github.com/angular/bower-angular.git#1.5.0
bower not-cached    https://github.com/angular/bower-angular-aria.git#1.5.0
bower resolve       https://github.com/angular/bower-angular-aria.git#1.5.0
bower not-cached    https://github.com/angular/bower-angular-animate.git#1.5.0
bower resolve       https://github.com/angular/bower-angular-animate.git#1.5.0
bower not-cached    https://github.com/angular/bower-angular-cookies.git#1.5.0
bower resolve       https://github.com/angular/bower-angular-cookies.git#1.5.0
bower not-cached    https://github.com/angular/bower-material.git#1.0.5
bower resolve       https://github.com/angular/bower-material.git#1.0.5
bower not-cached    https://github.com/angular/bower-angular-messages.git#1.5.0
bower resolve       https://github.com/angular/bower-angular-messages.git#1.5.0
bower not-cached    https://github.com/angular/bower-angular-resource.git#1.5.0
bower resolve       https://github.com/angular/bower-angular-resource.git#1.5.0
bower not-cached    https://github.com/angular/bower-angular-sanitize.git#1.5.0
bower resolve       https://github.com/angular/bower-angular-sanitize.git#1.5.0
bower not-cached    https://github.com/PascalPrecht/bower-angular-translate.git#2.9.0
bower resolve       https://github.com/PascalPrecht/bower-angular-translate.git#2.9.0
bower not-cached    https://github.com/PascalPrecht/bower-angular-translate-loader-partial.git#2.9.0
bower resolve       https://github.com/PascalPrecht/bower-angular-translate-loader-partial.git#2.9.0
bower not-cached    https://github.com/angular-ui/angular-ui-router-bower.git#0.2.18
bower resolve       https://github.com/angular-ui/angular-ui-router-bower.git#0.2.18
bower not-cached    https://github.com/moment/moment.git#2.11.2
bower resolve       https://github.com/moment/moment.git#2.11.2
bower not-cached    https://github.com/jquery/jquery-dist.git#2.2.0
bower resolve       https://github.com/jquery/jquery-dist.git#2.2.0
bower not-cached    https://github.com/johnpapa/toastr-bower.git#2.1.2
bower resolve       https://github.com/johnpapa/toastr-bower.git#2.1.2
bower not-cached    https://github.com/hgoebl/mobile-detect.js.git#1.3.1
bower resolve       https://github.com/hgoebl/mobile-detect.js.git#1.3.1
bower not-cached    https://github.com/noraesae/perfect-scrollbar-bower.git#0.6.10
bower resolve       https://github.com/noraesae/perfect-scrollbar-bower.git#0.6.10
bower not-cached    https://github.com/angular/bower-angular-mocks.git#1.5.0
bower resolve       https://github.com/angular/bower-angular-mocks.git#1.5.0
bower ECMDERR       Failed to execute "git ls-remote --tags --heads https://github.com/angular/bower-angular.git", exit code of #1 xcrun: error: active developer path ("/Volumes/PARTH PASSPORT/apps/oct 20/Xcode.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)

Additional error details:
xcrun: error: active developer path ("/Volumes/PARTH PASSPORT/apps/oct 20/Xcode.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)

1 个答案:

答案 0 :(得分:0)

您没有使用当前用户修改全局节点模块安装的正确权限。

尝试使用sudo权限运行命令。

sudo npm install -g yo gulp bower

您可能还需要使用管理员权限运行bower。