Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idea, webstorm 修改后端代码后,不会自动重启 worker 进程 #428

Closed
zlab opened this issue Feb 22, 2017 · 19 comments
Closed

idea, webstorm 修改后端代码后,不会自动重启 worker 进程 #428

zlab opened this issue Feb 22, 2017 · 19 comments

Comments

@zlab
Copy link

zlab commented Feb 22, 2017

idea, webstorm 修改后端代码后,不会自动重启 worker 进程,
用记事本或其它工具修改,会自动重启

@zlab zlab changed the title idia, webstorm 修改后端代码后,不会自动重启 worker 进程 idea, webstorm 修改后端代码后,不会自动重启 worker 进程 Feb 22, 2017
@atian25
Copy link
Member

atian25 commented Feb 22, 2017

我这边本地测试是没问题的

@myfreax
Copy link
Contributor

myfreax commented Feb 22, 2017

把你的启动命令贴出看看

@zlab
Copy link
Author

zlab commented Feb 22, 2017

npm run dev

@atian25
Copy link
Member

atian25 commented Feb 22, 2017

系统环境啥的呢? 有用 vagrant 么?

@zlab
Copy link
Author

zlab commented Feb 22, 2017

图片

自动保存不会触发重启,ctrl+s也不会触发,我用webpack,gulp都是可以触发的

我直接用记事本修改文件,会自动重启

@atian25
Copy link
Member

atian25 commented Feb 22, 2017

正常启动会有个 watcher 的日志的:

2017-02-22 15:28:44,577 INFO 72081 [egg:watcher:agent] watcher start success
2017-02-22 15:28:44,584 INFO 72077 [master] Agent Worker started (559ms)

你试下重新安装依赖, 还有 egg-bin 不要装全局的.

$ rm -rf node_modules
$ npm i
$ npm run dev

@atian25
Copy link
Member

atian25 commented Feb 22, 2017

cc @shaoshuai0102

@shaoshuai0102
Copy link
Contributor

idea, webstorm 修改文件有啥特殊机制么。。

@zlab
Copy link
Author

zlab commented Feb 22, 2017

图片

在webstorm里面改不会重启,我在外面用记事本改,就会重启

@zlab
Copy link
Author

zlab commented Feb 22, 2017

idea, webstorm 我都试过了,不行, vs code, atom,记事本可以

@jtyjty99999
Copy link
Member

jtyjty99999 commented Feb 22, 2017

可能与这个有关系 http://stackoverflow.com/questions/34213253/webpack-watch-not-working-on-webstorm-on-windows 配置下不使用 safe write 试试

@shaoshuai0102
Copy link
Contributor

image

确实是这个原因。

试试解决办法:

  1. 关掉 safe write
  2. 尝试下 egg-watcher-chokidar 替换默认 watcher

@zlab
Copy link
Author

zlab commented Feb 22, 2017

ok了,谢谢各位,就是重启还是报一堆的错

2017-02-22 16:23:25,923 ERROR 186360 nodejs.ECONNRESETError: read ECONNRESET
    at exports._errnoException (util.js:1022:11)
    at TCP.onread (net.js:569:26)
code: 'ECONNRESET'
errno: 'ECONNRESET'
syscall: 'read'
name: 'ECONNRESETError'
pid: 186360
hostname: zhanqi-pc

@shaoshuai0102
Copy link
Contributor

shaoshuai0102 commented Feb 22, 2017

�重启报错在这里跟进 #432

@atian25
Copy link
Member

atian25 commented Feb 22, 2017

@zlab 你的解决方案是选择了哪一种

@atian25 atian25 closed this as completed Feb 22, 2017
@zlab
Copy link
Author

zlab commented Feb 22, 2017

关掉 safe write
先用着吧,但是webpack确实不用 关掉 safe write 也是可以检测到的

@naffan2014
Copy link

sublime 编写egg。iterm2 运行的npm run dev 也是不自动重启

@Ailein
Copy link

Ailein commented Jun 30, 2017

修改了文件 自动重启了 ,页面打不开了,一直在等待,卡住了。

@Ailein
Copy link

Ailein commented Jun 30, 2017

image
image
新建的一个项目,没有动什么只是改了下hi, egg3,
环境 win10
node v6.10.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants