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

Issue with grunt server task #1092

Closed
micjamking opened this issue Jun 16, 2013 · 17 comments
Closed

Issue with grunt server task #1092

micjamking opened this issue Jun 16, 2013 · 17 comments

Comments

@micjamking
Copy link

After doing a fresh install via npm cache clean && npm install -g yo grunt-cli bower and creating a new webapp project using yo webapp, I cannot get grunt server to load the preview.

I receive no errors in the console; here is the output when running grunt server:

Running "server" task

Running "clean:server" (clean) task
Cleaning ".tmp"...OK

Running "concurrent:server" (concurrent) task

    Running "coffee:dist" (coffee) task
    File .tmp/scripts/hello.js created.

    Done, without errors.

    Running "compass:server" (compass) task

    Done, without errors.

Running "connect:livereload" (connect) task
Starting connect web server on localhost:9000.

Running "open:server" (open) task

Running "watch" task
Waiting...

...however, my browser (Chrome Canary 29.0) simply hangs trying to load http://localhost:9000, and I receive the following error after a timeout: Unable to load the webpage because the server sent no data.
Error code: ERR_EMPTY_RESPONSE

I'm able to run all other grunt tasks, without error, just launching the server seems to be the issue. I've also tried changing port number, which makes no difference, I still receive the same error.

Any help would be appreciated.

Thanks

@AndrewGleason
Copy link

I too am having this issue, any help would be greatly appreciated!

@mason-stewart
Copy link

Yep, running into the same issue here too.

@fspillner
Copy link

Same issue here! But it's strange: it works with curl ...

@fspillner
Copy link

I updated the version of connect-livereload to ~0.2 and it fixes the problem :)

@addyosmani
Copy link
Member

@micjamking can you let us know if updating to the above version of connect-livereload works for you too?

@AndrewGleason
Copy link

npm install connect-livereload in the webapp folder worked for me. all fixed!

@micjamking
Copy link
Author

I can confirm running npm install connect-livereload in the webapp folder gets the grunt server task to launch. Thanks @APGleason & everyone for your help.

However, grunt server doesnt seem to pick up the main.scss file or changes within it (ie, I receive a 404 for http://localhost:9000/styles/main.css). Running grunt server builds the .tmp directory, but it only contains scripts, not styles. Making a change to the main.scss file outputs the following in the console:

Running "watch" task
Waiting...OK
>> File "app/styles/main.scss" changed.


Running "compass:server" (compass) task
Nothing to compile. If you're trying to start a new project, you have left off the directory argument.
Run "compass -h" to get help.

Running "watch" task
Completed in 0.639s at Tue Jun 18 2013 07:15:53 GMT-1000 (HST) - Waiting...

This also affects the grunt task, because there is no files in the .tmp directory to compile down to the dist directory, so my app ends up style-less.

@addyosmani
Copy link
Member

I've bumped the version of connect-livereload being used to 0.2.0 for generator-webapp. Will test further to see if I can repro the server issues described.

@lukasz-zak
Copy link

@micjamking Are you fix this problem? Because I am in the same situation like you.

@lukasz-zak
Copy link

Ok I found solution.
If path with your project includind "[" or "]" then this issues appear.

I change my path and now all is fine.

@micjamking
Copy link
Author

@lukasz-zak Actually, that was my same issue :) Glad you figured it out!

@AutoSponge
Copy link

I spent about 2 hours chasing a myriad of different "possible" solutions. This did the trick.

The most frustrating part: yesterday everything worked fine. After a reboot, nothing but errors.

@lozandier
Copy link

I'm having the same issue now on Windows; I have connect-livereload 0.4 running and it simply hang on running "concurrent:serve"

@gpfiel
Copy link

gpfiel commented Mar 23, 2015

I tryed to npm install connect-livereload and not work, anyone knows what can i do?

@DerekHoffman
Copy link

Worst part for me is that I am getting no error and the window is just not showing up. Do I need to do something in my IIS?

Also I moved my files into TFS and used Yeoman to actually build the project originally. (got a new computer for work)

I installed Node.js NPM install / Bower / and grunt am I missing something?

@heshantha
Copy link

set PATH=C:\Ruby200-x64\bin;%PATH%

@rodsilver83
Copy link

I had this error when I run $grunt serve

Running "serve" task

Running "clean:server" (clean) task

1 path cleaned.

Running "wiredep:app" (wiredep) task

Running "wiredep:test" (wiredep) task

Running "wiredep:sass" (wiredep) task

Running "concurrent:server" (concurrent) task
Warning: Use --force to continue.

    Aborted due to warnings.

-The problem is that, the log has no warnings, so when I use, grunt serve --force, I got the opportunity to see the full task log, and I see that in my case I have a sintax problem in one of my scss, files, this compilation error couses the serve task to not run properly, I fixed my scss files and that worked for me.

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

No branches or pull requests