node.js - 如何修复react-scripts启动时的 “Error watching file for changes: ECONNRESET”错误?

标签 node.js redux compiler-errors runtime-error create-react-app

我正在CRA项目上运行npm start,并且在应用程序运行了很短的一段时间后收到此错误:

Error watching file for changes: ECONNRESET



我已经在这个项目上工作了几个月多了,并且从未见过这个错误,它从今天早上开始发生。我确定没有人更改过该项目中的任何内容,因为我是唯一从事此项目的人,而且我已经与公司的技术支持联系,以确保没有对我的工作站或本地进行任何修改或升级我们使用的文件服务器。此外,在同事的计算机上运行npm start时,它可以按预期工作。

这是我在shell中得到的完整错误日志:

events.js:183
      throw er; // Unhandled 'error' event
      ^

Error: Error watching file for changes: ECONNRESET
    at _errnoException (util.js:992:11)
    at FSEvent.FSWatcher._handle.onchange (fs.js:1359:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-react-theme@0.1.0 start: `set PORT=3001 && react-scripts start`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-react-theme@0.1.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\luis\AppData\Roaming\npm-cache\_logs\2019-01-30T13_50_03_616Z-debug.log

对于该项目,我的代码库很大。基本上,我声明使用Redux进行管理,并使用自定义的中间件进行REST调用。

针对其他相关问题,我读到我可能对网络提出要求。但是,当我以前使用REST API时遇到错误时,我曾经遇到的所有都是Redux错误,原因是它期望 Action 是纯对象。因此,我不太确定我的问题是否可能来自REST调用。

最佳答案

显然,删除我的项目并从远程存储库中再次拉出它对我来说很成功。我仍然不知道是什么真正导致了此问题,但我坚信这与缓存有关。

关于node.js - 如何修复react-scripts启动时的 “Error watching file for changes: ECONNRESET”错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54442695/

相关文章:

javascript - 我应该避免在 Node js 上的每一个异步/等待中 try catch 吗?

javascript - 如何实现根据 Redux 上按下的按钮从 API 接收不同数据的按钮?

javascript - 使用 React 和 Redux 的收藏夹购物车

android - Robolectric: “AndroidManifest.xml not found” 和 "Unable to find resource ID #0x7f09001b"

c++ - C++中const的用法

node.js - Tile38 Near by 查询 Node 回调函数不工作

node.js - 为什么node js中的云函数无法正确部署

c++ - 类模板和函数的显式特化

node.js - 在 Ubuntu 上简单安装当前版本的 Wekan?

reactjs - 何时使用 redux saga 以及何时使用 redux thunk?