Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/node.js/37.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js TypeError:fsevents不是构造函数(已经尝试了一系列答案)_Node.js_Reactjs_Npm_Yarnpkg - Fatal编程技术网

Node.js TypeError:fsevents不是构造函数(已经尝试了一系列答案)

Node.js TypeError:fsevents不是构造函数(已经尝试了一系列答案),node.js,reactjs,npm,yarnpkg,Node.js,Reactjs,Npm,Yarnpkg,我一直在关注马克西米利安·施瓦茨穆勒(Maximilian Schwarzmüller)关于 然后: 而且一切都很好(毫无疑问,还有一些警告) 然后,我将cd放入文件夹并npm start 首先,我遇到了以下错误:sh:react scripts:command not found 根据关于此链接的建议: 我尝试了:PATH=$PATH:./node\u modules/.bin npm start 它可以启动一个浏览器,它工作了 但事情开始变得糟糕了: 在线程中,同一个人建议:在全局npm安装

我一直在关注马克西米利安·施瓦茨穆勒(Maximilian Schwarzmüller)关于

然后:

而且一切都很好(毫无疑问,还有一些警告)

然后,我将cd放入文件夹并
npm start

首先,我遇到了以下错误:
sh:react scripts:command not found

根据关于此链接的建议:

我尝试了:
PATH=$PATH:./node\u modules/.bin npm start

它可以启动一个浏览器,它工作了

但事情开始变得糟糕了:

在线程中,同一个人建议:
在全局npm安装-g react scripts
纱线全局react scripts
中安装包。然后,可以在不设置环境的情况下执行它(PATH=$PATH:…)

所以我做了
npm安装-g react脚本

我开始犯错误:

TypeError: fsevents is not a constructor
据我所知,这个错误应该很常见。我已经尝试了我遇到的所有解决方案:安装Thread,
npm卸载-g create react app
,然后
npx create react app my app
。我也试过了

npm审计修复-强制执行
npm i fsevents

但什么都没用。它仍然向我显示了相同的
TypeError:fsevents不是构造函数

我觉得我可能把终端搞砸了。我可能把我头上的头发拔了一半。请帮帮我~我非常感谢~OTL对这个错误的任何建议

TypeError:fsevents不是构造函数

我必须在我的mac上安装watchman

对于这个错误

TypeError:fsevents不是构造函数

我必须在我的mac上安装watchman


您是否尝试过删除节点单元模块并再次安装它?@ImanRb因此我将“节点单元模块”移动到垃圾箱,如何再次安装它?我应该使用什么命令?npm i或warn addI正如您所说,它返回了相同的错误:return(new fsevents(path)).on('fsevent',callback).start();^TypeError:fsevents不是构造函数:/I我应该尝试其他解决方案吗?@ImanRb“npm I”可以下载包,但最终还是失败了,出现了相同的错误。另一方面,“yard add”在一开始就向我抛出了一条消息:错误:缺少要添加到项目中的包的列表。您是否尝试删除节点_模块并再次安装它?@ImanRb所以我将“节点_模块”移到垃圾箱中,如何再次安装它?我应该使用什么命令?npm i或warn addI正如您所说,它返回了相同的错误:return(new fsevents(path)).on('fsevent',callback).start();^TypeError:fsevents不是构造函数:/I我应该尝试其他解决方案吗?@ImanRb“npm I”可以下载包,但最终还是失败了,出现了相同的错误。另一方面,“yard add”在一开始就向我抛出了这个消息:error缺少要添加到项目中的包列表。
create-react-app react-complete-guide --scripts-version 1.1.5
TypeError: fsevents is not a constructor
brew install watchman