关于gyp ERR node-gyp gyp ERR node -v错误记录

重要出错信息

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

记录问题

开源框架运行之版本问题

  • 5
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值