【发布时间】:2026-02-01 11:20:10
【问题描述】:
版本信息:
node@4.6.0
node-gyp@3.4.0
npm@2.15.9
我尝试安装以下依赖项:
"canvas": "^1.1.6",
"exec-sync": "^0.1.6",
"fabric": "^1.6.0",
"request": "^2.67.0",
"word": "^0.2.4"
所以我做了一个 npm install 安装了以下依赖项:
"canvas": "^1.1.6",
"fabric": "^1.6.0",
"request": "^2.67.0",
"word": "^0.2.4"
但是 exec-sync 会出现以下错误:
1443 verbose stack Error: ffi@1.2.5 install: `node-gyp rebuild`
1443 verbose stack Exit status 1
1443 verbose stack at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/lib/utils/lifecycle.js:217:16)
1443 verbose stack at emitTwo (events.js:87:13)
1443 verbose stack at EventEmitter.emit (events.js:172:7)
1443 verbose stack at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/lib/utils/spawn.js:24:14)
1443 verbose stack at emitTwo (events.js:87:13)
1443 verbose stack at ChildProcess.emit (events.js:172:7)
1443 verbose stack at maybeClose (internal/child_process.js:829:16)
1443 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
此时我有点迷茫,我尝试了以下方法:
- 删除所有 node_modules 并尝试全新安装;
- 尝试单独安装模块;
是 node.js 与 exec-sync 构建的版本问题吗?,我迷路了。
【问题讨论】:
标签: node.js npm npm-install node-gyp