本来运行的好好的,结果无法运行了 yarn
npm i
都无效,错误如下
5552 verbose stack Error: command failed
5552 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/index.js:64:27)
5552 verbose stack at ChildProcess.emit (node:events:390:28)
5552 verbose stack at maybeClose (node:internal/child_process:1064:16)
5552 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5)
5553 verbose pkgid node-sass@4.14.1
5554 verbose cwd /Users/kyle/Documents/website/ele
5555 verbose Darwin 21.2.0
5556 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "i"
5557 verbose node v16.13.1
5558 verbose npm v8.1.2
5559 error code 1
5560 error path /Users/kyle/Documents/website/ele/node_modules/node-sass
5561 error command failed
5562 error command sh -c node scripts/build.js
解决过程
我以为是使用 cnpm 的原因,结果不是,我切换到原 npm 资源链接,使用代理还是如此。
如果我就试着删除了 node-sass ,安装成功了,项目运行也没有任何问题。