gpt4 book ai didi

node.js - 通过 npm 组装安装错误

转载 作者:太空宇宙 更新时间:2023-11-04 02:18:19 25 4
gpt4 key购买 nike

我想安装 assemble.io,但我只收到这个奇怪的错误消息。我使用node版本5.2.0,npm版本3.3.12,grunt 0.4.5。有人知道我做错了什么吗?

我使用以下命令安装插件:

npm install assemble --save-dev

这是安装的官方文档 http://assemble.io/docs/Installation.html

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "assemble" "--save-dev"
npm ERR! node v5.2.0
npm ERR! npm v3.3.12
npm ERR! code ENOSELF
npm ERR! Refusing to install assemble as a dependency of itself
npm ERR!
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\<my user>\Desktop\assemble test\npm-debug.log

这是 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 'assemble',
1 verbose cli '--save-dev' ]
2 info using npm@3.3.12
3 info using node@v5.2.0
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 silly fetchPackageMetaData assemble
8 silly fetchNamedPackageData assemble
9 silly mapToRegistry name assemble
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry uri https://registry.npmjs.org/assemble
13 verbose request uri https://registry.npmjs.org/assemble
14 verbose request no auth needed
15 info attempt registry request try #1 at 11:07:31
16 verbose request id aa14641fec14dacb
17 verbose etag "8IAPJTPQFKJPLI2YBI4NXTZG4"
18 http request GET https://registry.npmjs.org/assemble
19 http 304 https://registry.npmjs.org/assemble
20 verbose headers { date: 'Tue, 12 Jan 2016 10:07:31 GMT',
20 verbose headers via: '1.1 varnish',
20 verbose headers 'cache-control': 'max-age=300',
20 verbose headers etag: '"8IAPJTPQFKJPLI2YBI4NXTZG4"',
20 verbose headers age: '62',
20 verbose headers connection: 'keep-alive',
20 verbose headers 'x-served-by': 'cache-ams4139-AMS',
20 verbose headers 'x-cache': 'HIT',
20 verbose headers 'x-cache-hits': '1',
20 verbose headers 'x-timer': 'S1452593251.405495,VS0,VE1',
20 verbose headers vary: 'Accept' }
21 silly get cb [ 304,
21 silly get { date: 'Tue, 12 Jan 2016 10:07:31 GMT',
21 silly get via: '1.1 varnish',
21 silly get 'cache-control': 'max-age=300',
21 silly get etag: '"8IAPJTPQFKJPLI2YBI4NXTZG4"',
21 silly get age: '62',
21 silly get connection: 'keep-alive',
21 silly get 'x-served-by': 'cache-ams4139-AMS',
21 silly get 'x-cache': 'HIT',
21 silly get 'x-cache-hits': '1',
21 silly get 'x-timer': 'S1452593251.405495,VS0,VE1',
21 silly get vary: 'Accept' } ]
22 verbose etag https://registry.npmjs.org/assemble from cache
23 verbose get saving assemble to C:\Users\<my user>\AppData\Roaming\npm-cache\registry.npmjs.org\assemble\.cache.json
24 silly install normalizeTree
25 silly loadCurrentTree Finishing
26 silly loadIdealTree Starting
27 silly install loadIdealTree
28 silly cloneCurrentTree Starting
29 silly install cloneCurrentTreeToIdealTree
30 silly cloneCurrentTree Finishing
31 silly loadShrinkwrap Starting
32 silly install loadShrinkwrap
33 silly loadShrinkwrap Finishing
34 silly loadAllDepsIntoIdealTree Starting
35 silly install loadAllDepsIntoIdealTree
36 silly rollbackFailedOptional Starting
37 silly rollbackFailedOptional Finishing
38 silly runTopLevelLifecycles Starting
39 silly runTopLevelLifecycles Finishing
40 silly install printInstalled
41 verbose stack Error: Refusing to install assemble as a dependency of itself
41 verbose stack at checkSelf (C:\Program Files\nodejs\node_modules\npm\lib\install\validate-args.js:40:14)
41 verbose stack at Array.<anonymous> (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\bind-actor.js:15:8)
41 verbose stack at LOOP (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:15:14)
41 verbose stack at chain (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\chain.js:20:5)
41 verbose stack at C:\Program Files\nodejs\node_modules\npm\lib\install\validate-args.js:15:5
41 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:52:35
41 verbose stack at Array.forEach (native)
41 verbose stack at C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:52:11
41 verbose stack at Array.forEach (native)
41 verbose stack at asyncMap (C:\Program Files\nodejs\node_modules\npm\node_modules\slide\lib\async-map.js:51:8)
42 verbose cwd C:\Users\<my user>\Desktop\assemble test
43 error Windows_NT 6.3.9600
44 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "assemble" "--save-dev"
45 error node v5.2.0
46 error npm v3.3.12
47 error code ENOSELF
48 error Refusing to install assemble as a dependency of itself
49 error If you need help, you may report this error at:
49 error <https://github.com/npm/npm/issues>
50 verbose exit [ 1, true ]

格雷戈;)

最佳答案

好的,我发现了问题。官方文档已过时。我找到了答案there

Major refactor. Assemble was completely re-written from the ground-up as a standalone node.js library and is no longer a grunt plugin. Grunt plugin support has been moved to grunt-assemble. Please see that repo for additional details.

所以你必须使用

npm install grunt-assemble --save-dev

现在,如果您喜欢使用 assemble 和 grunt

关于node.js - 通过 npm 组装安装错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34741283/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com