gpt4 book ai didi

node.js - Windows 8 上的“npm i”错误

转载 作者:太空宇宙 更新时间:2023-11-03 22:16:46 24 4
gpt4 key购买 nike

我尝试安装软件包。在 Windows 7 上它工作得很好,但在 Windows 8 上我得到了:

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 'i' ]
2 info using npm@1.4.14
3 info using node@v0.10.29
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose readDependencies using package.json deps
6 verbose install where, deps [ 'C:\\csssr-project',
6 verbose install [ 'grunt',
6 verbose install 'grunt-autoprefixer',
6 verbose install 'grunt-bump',
6 verbose install 'grunt-combine-media-queries',
6 verbose install 'grunt-contrib-clean',
6 verbose install 'grunt-contrib-connect',
6 verbose install 'grunt-contrib-copy',
6 verbose install 'grunt-contrib-imagemin',
6 verbose install 'grunt-contrib-jade',
6 verbose install 'grunt-contrib-jshint',
6 verbose install 'grunt-contrib-stylus',
6 verbose install 'grunt-contrib-uglify',
6 verbose install 'grunt-contrib-watch',
6 verbose install 'grunt-csscomb',
6 verbose install 'grunt-newer',
6 verbose install 'grunt-prettify',
6 verbose install 'grunt-replace',
6 verbose install 'grunt-spritesmith',
6 verbose install 'load-grunt-tasks' ] ]
7 info preinstall csssr-project-template@0.7.3
8 verbose unsafe-perm in lifecycle true
9 error Error: spawn ENOENT
9 error at errnoException (child_process.js:1000:11)
9 error at Process.ChildProcess._handle.onexit (child_process.js:791:34)
10 error If you need help, you may report this *entire* log,
10 error including the npm and node versions, at:
10 error <http://github.com/npm/npm/issues>
11 error System Windows_NT 6.2.9200
12 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i"
13 error cwd C:\csssr-project
14 error node -v v0.10.29
15 error npm -v 1.4.14
16 error syscall spawn
17 error code ENOENT
18 error errno ENOENT
19 verbose exit [ 1, true ]

我的 npm 版本:

{
http_parser: '1.0',
node: '1.10.29',
v8: '3.14.5.9',
ares: '1.9.0-DEV',
uv: '0.10.27',
zlib: '1.2.3',
modules: '11',
openssl: '1.0.1h',
npm: '1.4.23'
}

我的package.json

    {
"name": "csssr-project-template",
"version": "0.7.3",
"title": "CSSSR Project Template",
"description": "A template for a quick start.",
"keywords": [
"csssr",
"project",
"template",
"frontend",
"grunt",
"jade",
"stylus"
],
"repository": {
"type": "git",
"url": "https://github.com/CSSSR/csssr-project-template.git"
},
"author": {
"name": "GC92",
"url": "https://github.com/GC92"
},
"copyright": "©CSSSR",
"bugs": {
"url": "https://github.com/CSSSR/csssr-project-template/issues/",
"email": "production@csssr.com"
},
"homepage": "https://github.com/CSSSR/csssr-project-template/",
"engines": {
"node": ">= 0.10.0"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-autoprefixer": "^0.8.2",
"grunt-bump": "0.0.15",
"grunt-combine-media-queries": "^1.0.19",
"grunt-contrib-clean": "^0.5.0",
"grunt-contrib-connect": "^0.8.0",
"grunt-contrib-copy": "^0.5.0",
"grunt-contrib-imagemin": "^0.7.2",
"grunt-contrib-jade": "^0.11.0",
"grunt-contrib-jshint": "^0.10.0",
"grunt-contrib-stylus": "^0.17.0",
"grunt-contrib-uglify": "^0.5.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-csscomb": "^3.0.0",
"grunt-newer": "^0.7.0",
"grunt-prettify": "^0.3.5",
"grunt-replace": "^0.7.8",
"grunt-spritesmith": "^2.1.1",
"load-grunt-tasks": "^0.6.0"
},
"scripts": {
"preinstall": "npm cache clear"
},
"browsers": {
"android": 4,
"chrome": 35,
"firefox": 30,
"ie": 10,
"ios": 6,
"opera": 12,
"safari": 6
}
}

如果我尝试从 package.json 中删除脚本部分,则会开始安装,但并非所有依赖项都会安装。在这种情况下,grunt 会抛出各种错误。

我做错了什么?

最佳答案

问题已在其中一项更新中修复。

关于node.js - Windows 8 上的“npm i”错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25381081/

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