npm犯错!错误:未知的,打开的'C:\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \。

时间:2021-06-17 20:52:08

i am new to famo.us, i am trying to install it from git repository command but i am not able to install it on my pc, i am using following command to install it on my PC using CMD

我是新来的。我正在尝试从git仓库命令中安装它,但是我不能在我的pc上安装它,我正在使用以下命令在我的pc上使用CMD安装它。

Command:

命令:

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

and the error each time i try to install i get is:

每次我尝试安装的时候都会出错:

Error:

错误:

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 uuid@1.4.1
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

i don't know where i am going wrong, please help me out with this issue.

我不知道哪里出了问题,请帮我解决这个问题。

Thanks.

谢谢。

EDIT:

编辑:

npm debug.log file:

npm调试。日志文件:

`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 npm@1.4.23
3 info using node@v0.10.31
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 generator-famous@
36 verbose lock generator-famous@ C:\Users\asd\AppData\Roaming\npm-cache\b7c541fd-generator-famous.lock
37 verbose addNamed [ 'yo', '' ]
38 verbose addNamed [ null, '*' ]
39 silly lockFile d937c28e-yo yo@
40 verbose lock yo@ 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 grunt-cli@
44 verbose lock grunt-cli@ C:\Users\asd\AppData\Roaming\npm-cache\d63f3d0b-grunt-cli.lock
45 verbose addNamed [ 'bower', '' ]
46 verbose addNamed [ null, '*' ]
47 silly lockFile 1240aab1-bower bower@
48 verbose lock bower@ 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',

1 个解决方案

#1


2  

It looks like npm is trying to fetch modules from your local cache. Try using npm cache clear force it to go online for future packages and then rerun the yo famous command.

看起来npm正在尝试从本地缓存中获取模块。尝试使用npm缓存清除强制它到网上为未来的软件包,然后重新运行你著名的命令。

#1


2  

It looks like npm is trying to fetch modules from your local cache. Try using npm cache clear force it to go online for future packages and then rerun the yo famous command.

看起来npm正在尝试从本地缓存中获取模块。尝试使用npm缓存清除强制它到网上为未来的软件包,然后重新运行你著名的命令。