2014-09-29 57 views
1

我正在嘗試安裝angular-firebase Yeoman發生器。我收到下面列出的錯誤。他們的意思是什麼?我試着用sudo和普通用戶安裝發生器。錯誤是一樣的。我很感謝您爲此提供的任何幫助或指導。謝謝!Yeoman發電機;這些錯誤意味着什麼?

npm ERR! Error: EACCES, mkdir '/Users/mac/.npm/fs-extra/0.10.0' 
    npm ERR! { [Error: EACCES, mkdir '/Users/mac/.npm/fs-extra/0.10.0'] 
    npm ERR! errno: 3, 
    npm ERR! code: 'EACCES', 
    npm ERR! path: '/Users/mac/.npm/fs-extra/0.10.0', 
    npm ERR! parent: 'imagemin' } 
    npm ERR! 
    npm ERR! Please try running this command again as root/Administrator. 
    npm ERR! System Darwin 11.4.2 
    npm ERR! command "node" "/usr/local/bin/npm" "install" 
    npm ERR! cwd /Users/mac/mcoseo7 
    npm ERR! node -v v0.10.32 
    npm ERR! npm -v 1.4.28 
    npm ERR! path /Users/mac/.npm/fs-extra/0.10.0 
    npm ERR! code EACCES 
    npm ERR! errno 3 
    npm ERR! stack Error: EACCES, mkdir '/Users/mac/.npm/fs-extra/0.10.0' 
    npm ERR! not ok code 0 

app/index.html modified. 
    CXX(target) Release/obj.target/fse/fsevents.o 
In file included from ../fsevents.cc:86: 
../src/constants.cc:10:66: warning: template argument uses unnamed type [-Wunnamed-type-template-args] 
    object->Set(NanNew<v8::String>("kFSEventStreamEventFlagNone"), NanNew<v8::Integer>(kFSEventStreamEventFlagNone)); 
                   ^~~~~~ 
/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/FSEvents.h:290:1: note: unnamed type used 
     in template argument was declared here 
enum { 
^ 
1 warning generated. 
    SOLINK_MODULE(target) Release/fse.node 
    SOLINK_MODULE(target) Release/fse.node: Finished 

    npm ERR! Error: EACCES, mkdir '/Users/mac/.npm/npmconf/2.0.9' 
    npm ERR! { [Error: EACCES, mkdir '/Users/mac/.npm/npmconf/2.0.9'] 
    npm ERR! errno: 3, 
    npm ERR! code: 'EACCES', 
    npm ERR! path: '/Users/mac/.npm/npmconf/2.0.9', 
    npm ERR! parent: 'phantomjs' } 
    npm ERR! 
    npm ERR! Please try running this command again as root/Administrator. 
    npm ERR! System Darwin 11.4.2 
    npm ERR! command "node" "/usr/local/bin/npm" "install" "karma-phantomjs-launcher" "karma-jasmine" 
"grunt-karma" "--save-dev" 
    npm ERR! cwd /Users/mac/mcoseo7 
    npm ERR! node -v v0.10.32 
    npm ERR! npm -v 1.4.28 
    npm ERR! path /Users/mac/.npm/npmconf/2.0.9 
    npm ERR! code EACCES 
    npm ERR! errno 3 
    npm ERR! stack Error: EACCES, mkdir '/Users/mac/.npm/npmconf/2.0.9' 
    npm ERR! not ok code 0 

White-Macbook-2:mcoseo7 mac$ grunt 
>> Local Npm module "grunt-autoprefixer" not found. Is it installed? 
>> Local Npm module "grunt-contrib-htmlmin" not found. Is it installed? 
>> Local Npm module "grunt-contrib-imagemin" not found. Is it installed? 
>> Local Npm module "grunt-contrib-watch" not found. Is it installed? 
>> Local Npm module "grunt-google-cdn" not found. Is it installed? 
>> Local Npm module "grunt-newer" not found. Is it installed? 
>> Local Npm module "grunt-ng-annotate" not found. Is it installed? 
>> Local Npm module "grunt-svgmin" not found. Is it installed? 
Warning: Task "newer:jshint" not found. Use --force to continue. 

感謝您的幫助!

+0

您是否嘗試使用-g標誌來啓動sudo? – 2014-09-29 02:56:04

+0

我嘗試過,但是當我運行咕嚕聲時它仍然告訴我它沒有被發現。 – rashadb 2014-09-29 04:11:38

+2

你是否爲你正在使用的用戶在〜/ .npm上運行chown?然後安裝你試圖添加的任何模塊。 – 2014-09-29 09:13:59

回答

4

要麼使用chown更改npm的權限,要麼使用sudo -g命令來安裝模塊。這似乎是OS權限的問題。

+1

你能舉一個例子說明如何用chown更改npm的權限嗎? – zakdances 2014-10-07 07:02:09

1

chown -R 'username' ~/.npm

約曼腳手架無後的錯誤應用。

Nik

相關問題