【发布时间】:2020-07-16 00:22:03
【问题描述】:
反应版本:
"react": "^16.13.1",
"react-dom": "^16.13.1",
npm 版本:6.14.4
纱线版本:1.22.0
节点版本:12.18.1 或 13.14.0
复制步骤
git clone https://github.com/1846689910/type-18-hek.git- 在项目目录下cd并运行
yarn或npm i -
yarn start或npm start
- 一般
yarn start尝试2到3次,就会出现问题
代码示例链接:https://github.com/1846689910/type-18-hek
当前行为
运行后yarn start
events.js:292
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:205:27)
Emitted 'error' event on Socket instance at:
at emitErrorNT (internal/streams/destroy.js:84:8)
at processTicksAndRejections (internal/process/task_queues.js:84:21) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
error Command failed with exit code 1.
预期行为
期待项目正常启动,如yarn run express
【问题讨论】:
-
它为我工作,老板
-
真的吗?我无法绕开这个问题。我在 Mac 和 Windows 上试过,没有人在工作。我其实不知道是什么导致了这个问题
-
哦,我在 linux 上,这可能很重要
-
@Ancinek 还没有。还是被这个困住了。我发现了一些与 event.js 错误相关的类似问题,但这些都没有帮助
-
@here 我想我想出了一个解决方案,虽然不是 100% 保证会在每次 npm start 时解决问题,但它在大多数情况下都有效。它可能是 inotify 观察者限制的问题。请查看github.com/guard/listen/wiki/…。 ``` 回声 fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p ``` 如果
illegal option -- p,也许试试-e
标签: node.js reactjs webpack-dev-server