grunt serve won't exit
'grunt serve' won't accept a ctrl-c. I just created a new project to test and I get the same behavior. Also, when I kill the process, it takes the shell with it.
Update: This 'hung' state only occurs after an express reload. Here is the output:
>> File "lib/controllers/api.js" changed. Running "newer:jshint:server" (newer) task Running "jshint:server" (jshint) task ✔ No problems Running "newer-timestamp:jshint:server:/Users/les/Documents/development/code/clients/barnhardt/beip/trunk/app/ea/node_modules/grunt-newer/.cache" (newer-timestamp) task Running "newer-reconfigure:jshint:server:1" (newer-reconfigure) task Running "express:dev" (express) task Stopping Express server Starting background Express server Running "watch" task ... Reload lib/controllers/api.js ... Completed in 0.103s at Tue Jan 14 2014 19:23:56 GMT-0500 (EST) - Waiting... debugger listening on port 5858 connect.multipart() will be removed in connect 3.0 visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives connect.limit() will be removed in connect 3.0 Express server listening on port 9000 in development mode GET / 304 5ms GET /partials/main 304 2ms GET /api/awesomeThings 304 1ms GET /partials/navbar 304 1ms
That all looks normal. Are you saying that it actually hangs up the command prompt or just that you can't type in it?
I had the similar problem. The shell states that the grunt had been stopped, but running ps shows the grunt process still hard at work. Had to kill - 9 the grunt pid. However it was actually because I was using ctrl-z, not ctrl-c. My bad. Just updated angular-fullstack, built it, and it works fine. Ctrl-c is ending grunt serve. On 15/01/2014 10:12 AM, "Les Stroud" [email protected] wrote:
'grunt serve' won't accept a ctrl-c. I just created a new project to test and I get the same behavior. Also, when I kill the process, it takes the shell with it.
Maybe I am missing something, but is there some other way to exit from 'grunt serve'?
— Reply to this email directly or view it on GitHubhttps://github.com/DaftMonk/generator-angular-fullstack/issues/52 .
Ok, I haven't used Ctrl+C for ending the process before, I just typically leave the grunt serve task running on a separate command prompt. But now I see what you mean, and it happened to me as well.
It's interesting that it's only triggered by the restart of the server. I've been thinking about switching the grunt-express-server to nodemon for other reasons, but if nodemon solves this as well, thats all the more reason.
Edit: nodemon doesn't have this problem with server reloads, but it's going to be hard to configure it the same way we have grunt-express-server setup..
@DaftMonk that's the problem I'm facing too, maybe it wasn't related to issue #42, sorry for the confusion on my part here.
If going nodemon breaks other functionality, maybe we could configure grunt to listen for SIGINT differently and have it issue the appropriate kills?
@lstroud Perhaps, but it looks like the creator of grunt-express-server is having a look at the problem and might be able to do something to fix it.
The issue seems to be that after the grunt-express-server stops, it removes all the listeners on the process, which also removes the listener for the abort command. Hopefully we can fix the problem right there.
I'm having this issue as well, glad to see it's already being addressed :)
I'm having this issue as well, glad to see it's already being addressed :)
+1 Great generator, but not being able to ctrl+c the serve process is quite the nuisance
+1 i also would like the idea of having nodemon running everything express related and grunt only for angular stuff, but I understand that's difficult to get set up. will try to dig into this myself.
+1
I have an outstanding PR for grunt-express-server that resolves this, just waiting for ericclemmons to get the chance to review it.
+1 agree !
When this symptom occurs does grunt also stop serving requests for you? When changing files I'm getting the symptom of the grunt process not being able to be terminated like here but it also will not serve any requests until I kill the proc and restart it.
Closed via https://github.com/ericclemmons/grunt-express-server/pull/39
Figured out my freezing issue. Had nothing to do with this, good to have this fixed though.
Thx guys, it can be fixed by updating to the latest version of grunt-express-server