npm 安装问题:gyp ERR!堆栈错误:`gyp` 失败,退出代码:1

时间:2021-04-15 00:42:49

标签: node.js node-modules node-gyp

我正在尝试安装 node_modules,但它总是返回错误。 Phyton 和 Visual Studio Build Tools 的配置如 https://www.npmjs.com/package/node-gyp

中所述
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc1 in position 32: ordinal not in range(128)
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Users\debor\AppData\Roaming\nvm\v14.15.4\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\debor\\AppData\\Roaming\\nvm\\v14.15.4\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\debor\telesto\node_modules\node-expat
gyp ERR! node -v v14.15.4
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN telesto@0.0.22 No repository field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.3.2 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})    
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules\glob-watcher\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})   

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-expat@2.3.18 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-expat@2.3.18 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

那些是依赖项:

"dependencies": {
    "@commitlint/cli": "^12.0.1",
    "@commitlint/config-conventional": "^12.0.1",
    "browser-sync": "^2.26.14",
    "colors": "^1.4.0",
    "easy-ftp": "^0.4.1",
    "fs-extra": "^9.1.0",
    "gulp": "^4.0.2",
    "gulp-cli": "^2.3.0",
    "gulp-data": "^1.3.1",
    "gulp-html-beautify": "^1.0.1",
    "gulp-inline-css": "^4.0.0",
    "gulp-pug": "^4.0.1",
    "gulp-rename": "^2.0.0",
    "gulp-stylus": "^2.7.0",
    "node-fetch": "^2.6.1",
    "pug": "^3.0.2",
    "xml2json": "^0.12.0"
  },
  "devDependencies": {
    "husky": "^5.1.3"
  }

0 个答案:

没有答案