mac下跑react项目npm start报错:fsevents is not a constructor

问题描述:

create-react-app新建的脚手架工程,npm start后报错:fsevents is not a constructor

系统版本

macOS Mojave 10.14.4

node 10.15.3

npm 6.x.x

解决办法:

将node版本降至8.16.0:

1.卸载node(mac下彻底卸载node:https://www.cnblogs.com/kivenlv/p/6096171.html

2.下载低版本(https://nodejs.org/zh-cn/download/releases/

思路:

网上同类错误都是跑truffle server产生的,解决办法是卸载后重新安装低版本的truffle。

试过将npm里的truffle降级无果。后来考虑到truffle和node本质都是启服务的,因此类比降低node版本,可行。

发布了34 篇原创文章 · 获赞 1 · 访问量 7905

猜你喜欢

转载自blog.csdn.net/landiyaaa/article/details/89684660