重要出错信息
gyp ERR! node -v v14.15.3
gyp ERR! node-gyp -v v5.1.0
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make: *** [Release/obj.target/fse/fsevents.o] Error 1
gypmake: *** [Release/obj.target/fse/fsevents.o] Error 1
ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
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 Darwin 21.1.0
gyp ERR! command \"/usr/local/bin/node\" \"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js\" \"build\" \"--fallback-to-build\" \"--module=/Users/hanshao/Documents/coding/toB-Frame/element/node_modules/fsevents/lib/binding/Release/node-v83-darwin-x64/fse.node\" \"--module_name=fse\" \"--module_path=/Users/hanshao/Documents/coding/toB-Frame/element/node_modules/fsevents/lib/binding/Release/node-v83-darwin-x64\" \"--napi_version=7\" \"--node_abi_napi=napi\"
gyp ERR! cwd /Users/hanshao/Documents/coding/toB-Frame/element/node_modules/fsevents
gyp ERR! node -v v14.15.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
网上解决方案
大大没试过,感觉不太可靠;游览量还是挺多的,如果可以朋友回复下,因为也是一种解决方案
sudo xcode-select -s
/Applications/Xcode.app/Contents/Developer
解决方案
错误分析:node高版本不兼容部分包导致的问题;node-sass包问题
方案一:降级node版本,12版本以下更加主要兼容性好(为啥大大不降级因为最新技术需要高版本的node)
方案二:指定下包镜像源即可解决及降低nodeSass版本包
//一,切换淘宝镜像
npm install --registry=http://registry.npm.taobao.org
或
npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass
//二,拉包
npm i node-sass@4
记录问题
开源框架运行之版本问题