2014-09-04 128 views
1

我是famo.us的新手,我正在嘗試安裝它從git倉庫的命令,但我不能在我的電腦上安裝它,我使用以下command使用我的電腦上安裝CMDnpm ERR! Error:UNKNOWN,open'C: Users Ahsan Hussain AppData Roaming npm-cache chalk 0.5.1 package package.json'

命令:

npm install -g yo grunt-cli bower generator-famous 

和錯誤每次我嘗試安裝我得到的是:

錯誤:

npm ERR! Error: UNKNOWN, open 'C:\Users\Ahsan Hussain\AppData\Roaming\npm-cache\ 
chalk\0.5.1\package\package.json' 
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at: 
npm ERR!  <http://github.com/npm/npm/issues> 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo" "grunt- 
cli" "bower" "generator-famous" 
npm ERR! cwd C:\Users\Ahsan Hussain\Desktop\famous 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.14 
npm ERR! path C:\Users\Ahsan Hussain\AppData\Roaming\npm-cache\chalk\0.5.1\packa 
ge\package.json 
npm ERR! code UNKNOWN 
npm ERR! errno -1 
npm ERR! fetch failed https://registry.npmjs.org/gruntfile-editor/-/gruntfile-ed 
itor-0.2.0.tgz 
C:\Users\Ahsan Hussain\AppData\Roaming\npm\grunt -> C:\Users\Ahsan Hussain\AppDa 
ta\Roaming\npm\node_modules\grunt-cli\bin\grunt 
npm ERR! unpack Could not read data for [email protected] 
npm ERR! Error: ENOENT, chmod 'C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_m 
odules\generator-famous\node_modules\update-notifier\node_modules\configstore\no 
de_modules\graceful-fs\.npmignore' 
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at: 
npm ERR!  <http://github.com/npm/npm/issues> 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo" "grunt- 
cli" "bower" "generator-famous" 
npm ERR! cwd C:\Users\Ahsan Hussain\Desktop\famous 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.14 
npm ERR! path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\generator- 
famous\node_modules\update-notifier\node_modules\configstore\node_modules\gracef 
ul-fs\.npmignore 
npm ERR! fstream_path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\ge 
nerator-famous\node_modules\update-notifier\node_modules\configstore\node_module 
s\graceful-fs\.npmignore 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! fstream_finish_call chmod 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modul 
es\fstream\lib\writer.js:305:19 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 
npm ERR! Error: ENOENT, chmod 'C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_m 
odules\generator-famous\node_modules\update-notifier\node_modules\configstore\no 
de_modules\js-yaml\package.json' 
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at: 
npm ERR!  <http://github.com/npm/npm/issues> 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo" "grunt- 
cli" "bower" "generator-famous" 
npm ERR! cwd C:\Users\Ahsan Hussain\Desktop\famous 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.14 
npm ERR! path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\generator- 
famous\node_modules\update-notifier\node_modules\configstore\node_modules\js-yam 
l\package.json 
npm ERR! fstream_path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\ge 
nerator-famous\node_modules\update-notifier\node_modules\configstore\node_module 
s\js-yaml\package.json 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! fstream_finish_call chmod 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modul 
es\fstream\lib\writer.js:305:19 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 
npm ERR! Error: ENOENT, chmod 'C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_m 
odules\generator-famous\node_modules\update-notifier\node_modules\configstore\no 
de_modules\mkdirp\.npmignore' 
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at: 
npm ERR!  <http://github.com/npm/npm/issues> 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo" "grunt- 
cli" "bower" "generator-famous" 
npm ERR! cwd C:\Users\Ahsan Hussain\Desktop\famous 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.14 
npm ERR! path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\generator- 
famous\node_modules\update-notifier\node_modules\configstore\node_modules\mkdirp 
\.npmignore 
npm ERR! fstream_path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\ge 
nerator-famous\node_modules\update-notifier\node_modules\configstore\node_module 
s\mkdirp\.npmignore 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! fstream_finish_call chmod 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modul 
es\fstream\lib\writer.js:305:19 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 
npm ERR! Error: ENOENT, lstat 'C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_m 
odules\generator-famous\node_modules\update-notifier\node_modules\configstore\no 
de_modules\osenv\.npmignore' 
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at: 
npm ERR!  <http://github.com/npm/npm/issues> 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo" "grunt- 
cli" "bower" "generator-famous" 
npm ERR! cwd C:\Users\Ahsan Hussain\Desktop\famous 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.14 
npm ERR! path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\generator- 
famous\node_modules\update-notifier\node_modules\configstore\node_modules\osenv\ 
.npmignore 
npm ERR! fstream_path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\ge 
nerator-famous\node_modules\update-notifier\node_modules\configstore\node_module 
s\osenv\.npmignore 
npm ERR! fstream_type File 
npm ERR! fstream_class FileWriter 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! fstream_stack C:\Program Files (x86)\nodejs\node_modules\npm\node_modul 
es\fstream\lib\writer.js:284:26 
npm ERR! fstream_stack Object.oncomplete (fs.js:107:15) 
npm ERR! Error: ENOENT, open 'C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_mo 
dules\generator-famous\node_modules\update-notifier\node_modules\configstore\nod 
e_modules\object-assign\object-assign.js' 
npm ERR! If you need help, you may report this *entire* log, 
npm ERR! including the npm and node versions, at: 
npm ERR!  <http://github.com/npm/npm/issues> 

npm ERR! System Windows_NT 6.1.7601 
npm ERR! command "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program File 
s (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "yo" "grunt- 
cli" "bower" "generator-famous" 
npm ERR! cwd C:\Users\Ahsan Hussain\Desktop\famous 
npm ERR! node -v v0.10.29 
npm ERR! npm -v 1.4.14 
npm ERR! path C:\Users\Ahsan Hussain\AppData\Roaming\npm\node_modules\generator- 
famous\node_modules\update-notifier\node_modules\configstore\node_modules\object 
-assign\object-assign.js 
npm ERR! code ENOENT 
npm ERR! errno 34 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  C:\Users\Ahsan Hussain\Desktop\famous\npm-debug.log 
npm ERR! not ok code 0 

我不知道我哪裏出錯了,請幫我解決這個問題。

謝謝。

編輯:

NPM文件的debug.log:

`0 info it worked if it ends with ok 
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe', 
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', 
1 verbose cli 'install', 
1 verbose cli '-g', 
1 verbose cli 'yo', 
1 verbose cli 'grunt-cli', 
1 verbose cli 'bower', 
1 verbose cli 'generator-famous' ] 
2 info using [email protected] 
3 info using [email protected] 
4 verbose node symlink C:\Program Files\nodejs\\node.exe 
5 verbose cache add [ 'yo', null ] 
6 verbose cache add name=undefined spec="yo" args=["yo",null] 
7 verbose parsed url { protocol: null, 
7 verbose parsed url slashes: null, 
7 verbose parsed url auth: null, 
7 verbose parsed url host: null, 
7 verbose parsed url port: null, 
7 verbose parsed url hostname: null, 
7 verbose parsed url hash: null, 
7 verbose parsed url search: null, 
7 verbose parsed url query: null, 
7 verbose parsed url pathname: 'yo', 
7 verbose parsed url path: 'yo', 
7 verbose parsed url href: 'yo' } 
8 verbose cache add [ 'grunt-cli', null ] 
9 verbose cache add name=undefined spec="grunt-cli" args=["grunt-cli",null] 
10 verbose parsed url { protocol: null, 
10 verbose parsed url slashes: null, 
10 verbose parsed url auth: null, 
10 verbose parsed url host: null, 
10 verbose parsed url port: null, 
10 verbose parsed url hostname: null, 
10 verbose parsed url hash: null, 
10 verbose parsed url search: null, 
10 verbose parsed url query: null, 
10 verbose parsed url pathname: 'grunt-cli', 
10 verbose parsed url path: 'grunt-cli', 
10 verbose parsed url href: 'grunt-cli' } 
11 verbose cache add [ 'bower', null ] 
12 verbose cache add name=undefined spec="bower" args=["bower",null] 
13 verbose parsed url { protocol: null, 
13 verbose parsed url slashes: null, 
13 verbose parsed url auth: null, 
13 verbose parsed url host: null, 
13 verbose parsed url port: null, 
13 verbose parsed url hostname: null, 
13 verbose parsed url hash: null, 
13 verbose parsed url search: null, 
13 verbose parsed url query: null, 
13 verbose parsed url pathname: 'bower', 
13 verbose parsed url path: 'bower', 
13 verbose parsed url href: 'bower' } 
14 verbose cache add [ 'generator-famous', null ] 
15 verbose cache add name=undefined spec="generator-famous" args=["generator-famous",null] 
16 verbose parsed url { protocol: null, 
16 verbose parsed url slashes: null, 
16 verbose parsed url auth: null, 
16 verbose parsed url host: null, 
16 verbose parsed url port: null, 
16 verbose parsed url hostname: null, 
16 verbose parsed url hash: null, 
16 verbose parsed url search: null, 
16 verbose parsed url query: null, 
16 verbose parsed url pathname: 'generator-famous', 
16 verbose parsed url path: 'generator-famous', 
16 verbose parsed url href: 'generator-famous' } 
17 silly lockFile c41975d1-yo yo 
18 verbose lock yo C:\Users\asd\AppData\Roaming\npm-cache\c41975d1-yo.lock 
19 silly lockFile 671ef8ac-grunt-cli grunt-cli 
20 verbose lock grunt-cli C:\Users\asd\AppData\Roaming\npm-cache\671ef8ac-grunt-cli.lock 
21 silly lockFile 206e3ce5-bower bower 
22 verbose lock bower C:\Users\asd\AppData\Roaming\npm-cache\206e3ce5-bower.lock 
23 silly lockFile b3babf7a-generator-famous generator-famous 
24 verbose lock generator-famous C:\Users\asd\AppData\Roaming\npm-cache\b3babf7a-generator-famous.lock 
25 silly lockFile b3babf7a-generator-famous generator-famous 
26 silly lockFile b3babf7a-generator-famous generator-famous 
27 silly lockFile c41975d1-yo yo 
28 silly lockFile c41975d1-yo yo 
29 silly lockFile 206e3ce5-bower bower 
30 silly lockFile 206e3ce5-bower bower 
31 silly lockFile 671ef8ac-grunt-cli grunt-cli 
32 silly lockFile 671ef8ac-grunt-cli grunt-cli 
33 verbose addNamed [ 'generator-famous', '' ] 
34 verbose addNamed [ null, '*' ] 
35 silly lockFile b7c541fd-generator-famous [email protected] 
36 verbose lock [email protected] C:\Users\asd\AppData\Roaming\npm-cache\b7c541fd-generator-famous.lock 
37 verbose addNamed [ 'yo', '' ] 
38 verbose addNamed [ null, '*' ] 
39 silly lockFile d937c28e-yo [email protected] 
40 verbose lock [email protected] C:\Users\asd\AppData\Roaming\npm-cache\d937c28e-yo.lock 
41 verbose addNamed [ 'grunt-cli', '' ] 
42 verbose addNamed [ null, '*' ] 
43 silly lockFile d63f3d0b-grunt-cli [email protected] 
44 verbose lock [email protected] C:\Users\asd\AppData\Roaming\npm-cache\d63f3d0b-grunt-cli.lock 
45 verbose addNamed [ 'bower', '' ] 
46 verbose addNamed [ null, '*' ] 
47 silly lockFile 1240aab1-bower [email protected] 
48 verbose lock [email protected] C:\Users\asd\AppData\Roaming\npm-cache\1240aab1-bower.lock 
49 silly addNameRange { name: 'generator-famous', range: '*', hasData: false } 
50 silly addNameRange { name: 'yo', range: '*', hasData: false } 
51 silly addNameRange { name: 'bower', range: '*', hasData: false } 
52 silly addNameRange { name: 'grunt-cli', range: '*', hasData: false } 
53 verbose request where is /generator-famous 
54 verbose request registry https://registry.npmjs.org/ 
55 verbose request id 4cc3970562804123 
56 verbose url raw /generator-famous 
57 verbose url resolving [ 'https://registry.npmjs.org/', './generator-famous' ] 
58 verbose url resolved https://registry.npmjs.org/generator-famous 
59 verbose request where is https://registry.npmjs.org/generator-famous 
60 info trying registry request attempt 1 at 20:29:32 
61 verbose etag "81J3BB1D3D9ORNGDE598Z6D3W" 
62 http GET https://registry.npmjs.org/generator-famous 
63 verbose request where is /bower 
64 verbose request registry https://registry.npmjs.org/ 
65 verbose url raw /bower 
66 verbose url resolving [ 'https://registry.npmjs.org/', './bower' ] 
67 verbose url resolved https://registry.npmjs.org/bower 
68 verbose request where is https://registry.npmjs.org/bower 
69 info trying registry request attempt 1 at 20:29:32 
70 verbose etag "9WQET6GYB7QHG5UFTGDH0KLIN" 
71 http GET https://registry.npmjs.org/bower 
72 verbose request where is /grunt-cli 
73 verbose request registry https://registry.npmjs.org/ 
74 verbose url raw /grunt-cli 
75 verbose url resolving [ 'https://registry.npmjs.org/', './grunt-cli' ] 
76 verbose url resolved https://registry.npmjs.org/grunt-cli 
77 verbose request where is https://registry.npmjs.org/grunt-cli 
78 info trying registry request attempt 1 at 20:29:32 
79 verbose etag "54QNW6NQ2WNHWUGFJR6BHGBXZ" 
80 http GET https://registry.npmjs.org/grunt-cli 
81 verbose request where is /yo 
82 verbose request registry https://registry.npmjs.org/ 
83 verbose url raw /yo 
84 verbose url resolving [ 'https://registry.npmjs.org/', './yo' ] 
85 verbose url resolved https://registry.npmjs.org/yo 
86 verbose request where is https://registry.npmjs.org/yo 
87 info trying registry request attempt 1 at 20:29:32 
88 verbose etag "75MPK1TPZXLN8TK5MU5INCBLD" 
89 http GET https://registry.npmjs.org/yo 
90 http 304 https://registry.npmjs.org/bower 
91 silly registry.get cb [ 304, 
91 silly registry.get { date: 'Thu, 04 Sep 2014 15:29:35 GMT', 
91 silly registry.get  server: 'Apache', 
91 silly registry.get  via: '1.1 varnish', 
91 silly registry.get  'last-modified': 'Thu, 04 Sep 2014 15:29:21 GMT', 
91 silly registry.get  'cache-control': 'max-age=60', 
91 silly registry.get  etag: '"9WQET6GYB7QHG5UFTGDH0KLIN"', 
91 silly registry.get  'x-served-by': 'cache-fra1227-FRA', 
91 silly registry.get  'x-cache': 'HIT', 
91 silly registry.get  'x-cache-hits': '2', 
91 silly registry.get  'x-timer': 'S1409844575.170233,VS0,VE0', 
91 silly registry.get  vary: 'Accept', 
91 silly registry.get  'content-length': '0', 
91 silly registry.get  'keep-alive': 'timeout=10, max=50', 
91 silly registry.get  connection: 'Keep-Alive' } ] 
92 verbose etag https://registry.npmjs.org/bower from cache 
93 http 304 https://registry.npmjs.org/grunt-cli 
94 silly registry.get cb [ 304, 
94 silly registry.get { date: 'Thu, 04 Sep 2014 15:29:35 GMT', 
94 silly registry.get  server: 'Apache', 
94 silly registry.get  via: '1.1 varnish', 
94 silly registry.get  'last-modified': 'Thu, 04 Sep 2014 15:29:26 GMT', 
94 silly registry.get  'cache-control': 'max-age=60', 
94 silly registry.get  etag: '"54QNW6NQ2WNHWUGFJR6BHGBXZ"', 
94 silly registry.get  'x-served-by': 'cache-fra1233-FRA', 
94 silly registry.get  'x-cache': 'HIT', 
94 silly registry.get  'x-cache-hits': '2', 
94 silly registry.get  'x-timer': 'S1409844575.221631,VS0,VE0', 
94 silly registry.get  vary: 'Accept', 
94 silly registry.get  'content-length': '0', 
94 silly registry.get  'keep-alive': 'timeout=10, max=50', 
94 silly registry.get  connection: 'Keep-Alive' } ] 
95 verbose etag https://registry.npmjs.org/grunt-cli from cache 
96 silly addNameRange number 2 { name: 'bower', range: '*', hasData: true } 
97 silly addNameRange versions [ 'bower', 
97 silly addNameRange [ '0.1.0', 
97 silly addNameRange  '0.1.2', 
97 silly addNameRange  '0.1.3', 
97 silly addNameRange  '0.2.0', 
97 silly addNameRange  '0.3.0', 
97 silly addNameRange  '0.3.1', 
97 silly addNameRange  '0.3.2', 
97 silly addNameRange  '0.4.0', 
97 silly addNameRange  '0.5.0', 
97 silly addNameRange  '0.5.1', 
97 silly addNameRange  '0.6.0', 
97 silly addNameRange  '0.6.1', 
97 silly addNameRange  '0.6.2', 
97 silly addNameRange  '0.6.3', 
97 silly addNameRange  '0.6.4', 
97 silly addNameRange  '0.6.5', 
97 silly addNameRange  '0.6.6', 
97 silly addNameRange  '0.6.7', 
97 silly addNameRange  '0.6.8', 
97 silly addNameRange  '0.7.0', 
97 silly addNameRange  '0.7.1', 
97 silly addNameRange  '0.8.0', 
97 silly addNameRange  '0.8.1', 
97 silly addNameRange  '0.8.2', 
97 silly addNameRange  '0.8.3', 
97 silly addNameRange  '0.8.4', 
97 silly addNameRange  '0.8.5', 
97 silly addNameRange  '0.8.6', 
97 silly addNameRange  '0.9.0', 
97 silly addNameRange  '0.9.1', 
97 silly addNameRange  '0.9.2', 
97 silly addNameRange  '0.10.0', 
97 silly addNameRange  '1.0.0', 
97 silly addNameRange  '1.0.1', 
97 silly addNameRange  '1.0.2', 
97 silly addNameRange  '1.0.3', 
97 silly addNameRange  '1.1.0', 
97 silly addNameRange  '1.1.1', 
97 silly addNameRange  '1.1.2', 
97 silly addNameRange  '1.2.0', 
97 silly addNameRange  '1.2.1', 
97 silly addNameRange  '1.2.2', 
97 silly addNameRange  '1.2.3', 
97 silly addNameRange  '1.2.4', 
97 silly addNameRange  '1.2.5', 
+0

我不知道答案,但對於誰downvoted是downvoting,甚至沒有評論是粗魯的.. – 2014-09-04 17:24:17

+0

你應該發佈npm-debug.log文件,該節點將留在你的後面的目錄運行命令。你發佈的這個輸出實際上只是Node尖叫**「HEY有一個錯誤的某個地方!!!」**:P – 2014-09-04 18:53:31

+0

@KraigWalker我編輯了這個問題,請檢查 – 2014-09-05 07:50:23

回答

2

它看起來像故宮正試圖從本地緩存讀取模塊。嘗試使用npm cache clear強制它爲將來的軟件包上線,然後重新運行yo famous命令。

+0

也嘗試一次安裝一個軟件包Windows 'npm install -g yo' 'npm install -g grunt-cli' 'npm install -g generator-famous'等... 查看錯誤是個別的 – talves 2014-09-08 08:41:54

+0

對於googlers - @talves也是正確的。在我的情況下,npm cache clear並不適用於它自己。必須使用'npm install npm -g'。 – HockeyJ 2014-11-25 14:56:42

相關問題