-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Grunt 0.4] reload task launch server each time & do not trigger refresh #13
Comments
it seems the |
I can confirm this bug also. |
+1 |
same problem here Fatal error: listen EADDRINUSE |
A short term fix might be to connect to the (already running) server first, triggering the reload event via a get on a certain URL (/triggerReload?). I might take a stab at this. |
In the reload task, a request is made to http://localhost:{port}/reloadTrigger. If this succeeds, this emits reload messages in the running server process. If the request fails, the server is started in the current process.
Man, this sucks. Have a project on grunt 0.4 and having the same error. Would it be possible to just kill the previously-existing server so it doesn't have this error on reload or no? |
@manuel-woelker please send a pull request with that change. Excellent solution that works beautifully with the latest grunt-contrib-watch. You are my hero. :D |
For those who is still experiencing same problems and found this page just like I did. Try to install npm package directly from GitHub instead of using npm repo. npm install git://github.com/webxl/grunt-reload.git --save-dev This suggestion is reasonable until @webxl didn't npm-published latest version. (see npm version is 0.2, but current master branch is already 0.4). |
Ah! Thanks @SpeCT! |
Closing due to inactivity |
I've just started a new project with grunt 0.4a, & like the doc said, I run reload before watch (to start server) & reload each time my CSS change, but the 2nd reload, instead of trigger the refresh, just try to start a new server (error:
Fatal error: listen EADDRINUSE
). I made some uggly debbuging & it seems that servers are not properly stored in thevar servers
. Can this be a variable scope issue comming up with grunt 0.4 ? Or maybe a problem withserver.default
syntax (default is a reserved keyword for theswitch
) ?The text was updated successfully, but these errors were encountered: