Skipping failed optional dependency /chokidar/fsevents

在Node.js更新到5.9版本后,执行npm install babel时遇到Skipping failed optional dependency错误。解决方案是更新npm版本,通过运行npminpm-g命令来解决。

node 更新到了 5.9 版本,执行 npm i babel –save 安装 babel 的时候提示 Skipping failed optional dependency /chokidar/fsevents

解决方案:更新 npm 版本即可,执行如下命令

npm i npm -g

gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/root/builds/TDcgDEZF/0/caicai/aiguanpei/node_modules/node-sass/.node-gyp' gyp ERR! System Linux 3.10.0-957.el7.x86_64 gyp ERR! command "/opt/node-v14.21.3-linux-x64/bin/node" "/root/builds/TDcgDEZF/0/caicai/aiguanpei/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd /root/builds/TDcgDEZF/0/caicai/aiguanpei/node_modules/node-sass gyp ERR! node -v v14.21.3 流水线部署时显示了这些错误 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.14.1 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2025-12-02T11_09_43_771Z-debug.log ERROR: Job failed: Process exited with status 1
最新发布
12-03
gyp ERR! build error , gyp ERR! stack Error: `make` failed with exit code: 2 , gyp ERR! stack at ChildProcess.onExit (/root/.jenkins/jobs/6734cd56247f4290bae82b3f58d05bdd/workspace/node_modules/node-gyp/lib/build.js:262:23) , gyp ERR! stack at ChildProcess.emit (events.js:223:5) , gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) , gyp ERR! System Linux 4.19.90-24.4.v2101.ky10.x86_64 , gyp ERR! command "/usr/local/bin/node" "/root/.jenkins/jobs/6734cd56247f4290bae82b3f58d05bdd/workspace/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" , gyp ERR! cwd /root/.jenkins/jobs/6734cd56247f4290bae82b3f58d05bdd/workspace/node_modules/node-sass , gyp ERR! node -v v12.15.0 , gyp ERR! node-gyp -v v3.8.0 , gyp ERR! not ok , Build failed with error code: 1 , npm WARN notsup Unsupported engine for tmp@0.2.3: wanted: {"node":">=14.14"} (current: {"node":"12.15.0","npm":"6.13.4"}) , npm WARN notsup Not compatible with your version of node/npm: tmp@0.2.3 , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.3.2 (node_modules/chokidar/node_modules/fsevents): , npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.3.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/watchpack-chokidar2/node_modules/chokidar/node_modules/fsevents): , npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/webpack-dev-server/node_modules/chokidar/node_modules/fsevents): , npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"}) , npm WARN notsup Unsupported engine for @xmldom/xmldom@0.9.8: wanted: {"node":">=14.6"} (current: {"node":"12.15.0","npm":"6.13.4"}) , npm WARN notsup Not compatible with your version of node/npm: @xmldom/xmldom@0.9.8 , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@4.0.9 (node_modules/bufferutil): , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: bufferutil@4.0.9 install: `node-gyp-build` , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@5.0.10 (node_modules/utf-8-validate): , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: utf-8-validate@5.0.10 install: `node-gyp-build` , npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 , , npm ERR! code ELIFECYCLE , npm ERR! errno 1 , npm ERR! node-sass@4.14.1 postinstall: `node scripts/build.js` , npm ERR! Exit status 1 , npm ERR! , npm ERR! Failed at the node-sass@4.14.1 postinstall script. , npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
07-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值