react项目启动报错总结

启动react项目报错

npm ERR! path D: trainarea\big- screen\react- big- screen\node modules\node sass
npm ERR! command failed
ERR Comand c wWiIndows\systemszvcnd.exe / /S /9 nodescripts/ bu1Id.Js
--1
npm ERR! Eyp info it worked if it ends with oka
react-big- screen\node modules node- eypbin\node-gyp.js
ebuild
verbose
libsass ext-
libsass cflags= --libsass ldflags=
libsass library=
npm ERR! gyp verb cli 
npm ERR! gyp verb
'C: Program Filesl\nodejs\lnode.exe' ,
npm ERR! gyp verb cli ' D: Mtrainareallbig- screen\\react-big screen\node modules\\node- gypl\bin\\node- gyp.js',
npm ERR! gyp verb c
libsass
npm ERR! Eyp verb cli
npm ERR! gyP verb cli --libsass ldflags= i
ERR! EVP verb cli,”- libsass library-
npm ERR! EYP info using node gvp@3.8.0
npm ERR! Eyp info using node@16.20.2| win32| x64
ERR! gyp verb command rebuild [ ]
npm ERR! EYP verb command clean [
DERRI EyDverbcomaindconfteure nre co 
npm ERR! eyp verb check python checking for Python executable "python2" in the PATH
npm ERR! EVP verb which failed Error: not found: python2
npm ERR! gyp verb、 which failed at getNotFoundError (D: trainarea\big- screen\react- big- screen\node modules\whichwhich. js:13:12)
pmERRBYPVerDwhichtatlen
npm ERR! EVP verb which'failed
at D:\trainarea\big screen\react- big- screen\node modulesWwhich\which. js:89:16
npm ERR! gyp verb which failed
at D:\trainarea\big- screen\react big- screen\node modules\isexe\index. jis:42:5
npm ERR! gyp verb which failed
at D:\trainarea\big- screen\react- big- screen\node modules\isexe\windows . js: 36:5
npm ERR! gyp verb which
failed
at FSReqCallback . oncomplete (node:fs :202:21)
FRRU BVD Werh which Failed
EetotFundrorpitrarnarararsgsreeereacrebierscreenrnoe modueswhihwhih.js;13:12)
npm ERR! eyp verb which' failed
E (D: \trainareabig screen\react big screen\node modulesWwhichwhich. js:80:29)
npm ERR! gYP verb which failed
at D: trainarea\big- screentreact- big- screen\node modules WwhichWwhich.js:89:16
npm ERR! EYP verb which failed
a D:trai narealbi g-screentreact-big-screeninode modulestisexetindex. 1s:42:5
npmERR EYP verb which fatled a Ditranareabig-screenreact-big-screennode modu
ules\ise
. js:36:5
npm ERR! EyVP verb which failed code: ENOENTRRIIE
npm ERR! EYP verb which failed }
ERR! gyp verb check python checking for Python executable "python" in the PATH
ERR! EyP verb
which succeeded python D: Programs \Python\Python311\python. EXE
npm ERR! BYP ERR! stack Error: Command failed: D: Prorams/PthonPython311pytho.EXE -C import sys; print "%s .%5.%s" % sys.version info[:3];
npm ERR! gyp ERR! stack File "<string>", lin
npm ERR! g
ERR! stack
import sys; print "% .%s.%s" % sys.version info[:3];
npm ERR! gyp ERR! stack
npm ERR! EYP ERR! stack SyntaxError: Missing parentheses in call to 'print’. Did you m
prit...)?
npm ERR! EYP ERR! stack
at ChildProcess . exithandler (node: child process:402:12)
npm ERR! Eyp ERR! stack
t ChildProcess. emit (node:events :513:28)
ERR! gyp ERR! stac
at maybeClose (node: internal/child process:1100:16)
npm ERR! gYp ERR! stack
at Process .ChildProcess. handle.onexit (node: internal/child process:384:5)
nPERR EYP ERR
command ":MProgram Filesl\nddejs\Inode .exe" "D: \trainareal\big screenNreact- big screen\Inode modulesl\node gyp\\bin\Inode- gyp.js"
”rebuild
verbose
””-
1ibsass_ ext-
”"--1ibsass_ cflags=" "--libsass ldflags=" "--libsass library="
npm ERR! EYP ERR! cid D: \trainarealbig screen\react- big- screen\node modules\node sass
npm ERR! gyp ERR! node -v v16.20.2
Eyp ERR! node-gyp -Vv3.8.0
1pm ERR
BYPERET
mot ok
npm ERR! Build failed with error code: 1

按照报错提示一顿瞎搞最后还是不对

最后:更换node.js版本为14.17.2启动项目成功

报错类型2

(暂时找不到报错内容)

有些报错是由于npm启动有问题,如果项目安装了yarn可以改用yarn启动,可以启动成功,毫无逻辑可言,并不知道为啥

此文章为11月Day10学习笔记,内容来源于极客时间《后端工程师的高阶面经》,强烈推荐该课程

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值