我有点机智到此为止。我在本地主机上工作,每次尝试启动服务器时,它都会告诉我运行yarn install,但是当我尝试运行yarn install时,会出现如下错误:
20 warnings and 6 errors generated.
20 warnings and 6 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/robertgervais/projects/bike_index/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command \"/usr/local/Cellar/node/12.1.0/bin/node\" \"/Users/robertgervais/projects/bike_index/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/robertgervais/projects/bike_index/node_modules/fsevents
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/12.1.0/bin/node /Users/robertgervais/projects/bike_index/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/Users/robertgervais/projects/bike_index/node_modules/fsevents/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:196:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1000:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)
node-pre-gyp ERR! System Darwin 18.2.0
node-pre-gyp ERR! command \"/usr/local/Cellar/node/12.1.0/bin/node\" \"/Users/robertgervais/projects/bike_index/node_modules/fsevents/node_modules/node-pre-gyp/bin/node-pre-gyp\" \"install\" \"--fallback-to-build\"
node-pre-gyp ERR! cwd /Users/robertgervais/projects/bike_index/node_modules/fsevents
node-pre-gyp ERR! node -v v12.1.0
node-pre-gyp ERR! node-pre-gyp -v v0.10.3
node-pre-gyp ERR! not ok
make: *** [Release/obj.target/fse/fsevents.o] Error 1
Failed to execute '/usr/local/Cellar/node/12.1.0/bin/node /Users/robertgervais/projects/bike_index/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node --module_name=fse --module_path=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64 --napi_version=4 --node_abi_napi=napi' (1)
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/robertgervais/projects/bike_index/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:196:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:256:12)
gyp ERR! System Darwin 18.2.0
gyp ERR! command \"/usr/local/Cellar/node/12.1.0/bin/node\" \"/Users/robertgervais/projects/bike_index/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/robertgervais/projects/bike_index/node_modules/fsevents/lib/binding/Release/node-v72-darwin-x64\" \"--napi_version=4\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/robertgervais/projects/bike_index/node_modules/fsevents
gyp ERR! node -v v12.1.0
gyp ERR! node-gyp -v v3.8.0
我一直在努力寻找堆栈,现在试图找到解决方法,但是我没有任何运气。
请指向正确的方向
答案 0 :(得分:0)
我只是遇到了同样的问题。我的 yarn.lock 文件所引用的 fsevents 版本的远程URL似乎提供了404。我能够通过运行{{1}来解决此问题},然后将我所有的软件包更新为最新版本。将此fsevent更新为1.2.9,并修复了错误。
我注意到在您给出错误消息之前,控制台中还有以下内容:
yarn upgrade-interactive
答案 1 :(得分:0)
以下命令将帮助您解决问题
yarn cache clean && yarn upgrade && yarn