-
Notifications
You must be signed in to change notification settings - Fork 310
Failing to load styles when I run test task while running a server #174
Comments
I am seeing the same thing. On both building and just running server the main.css file is not being genereated. For example.tmp/styles/ is empty when doing a fresh install and grunt server. On OS X here if that makes a difference. |
I too am getting a similar outcome. After successfully running 'yo webapp' and then 'grunt server' I get the index.html file loading in my browser but void of any sign of a stylesheet, there is a reference in index.html to main.css but the file is empty. Assuming that the .scss is compiled into main.css I can only theorize that running 'grunt server' is not compiling Sass to CSS ? |
That's weird. Maybe a stupid question, but do you have sass installed? My problem (and @ecurtis problem, I presume) is only when I run |
Interesting that you ask @bernardogfilho , It is certainly not a stupid question since I am attempting this without knowing or ever using SASS, or LESS, I would have assumed it to be installed as a dependency or initialized a warning once completing the yo webapp command...but no, I don't think I do. How would I go about installing SASS? |
Found the fix, it is an error in bootstrap or sass bootstrap. In /app/bower_components/sass-bootstrap/lib/_grid.scss you need to replace the m-dash with hyphens and then it will compile and copy. It was not a problem with test. References: |
Actually, I have no problems with a |
Yup, I noticed that there was sass error that was preventing the generation of the main.css file in .tmp for me I do not think it is the grunt test cleaning it out, I think it never generates. All fixed and working now here. Good luck. |
@ryan-w-moore You need to install Ruby, and then install the sass gem. You can follow the instructions at their website http://sass-lang.com/download.html |
Had the same issues as noted above. Tried everything people suggested, but nothing worked. Noticed nodejs was out of date, updated per http://davidwalsh.name/upgrade-nodejs and everything worked as expected after starting from scratch and following the steps in http://addyosmani.com/blog/5-minutes-with-yeoman/ |
Re: test task: In the Yeoman workflow, test is a standalone task, not meant to be run alongside server. You can edit it a bit so that it uses server assets (we've done that on our application, more familiar for the Rails devs), but then it will require server to be running, and the default Six of one, half dozen of the other. |
@ryan-w-moore @christianboyle Yeoman + Grunt usually requires Compass as it carries SASS as a dependancy, so try UPDATE 1/11/13 @ecurtis The whole "non-ASCII dash" thing was fixed as of Bootstrap's 3.0.1 release (see the Release Plan) which is included in |
Thanks for your reply @robwierzbowski (: I'll close this issue for now. |
In my case I solved this by running |
I changed the port of the task test to a different one from the server task to run both at the same time. It works, but when I run the test task, the server fails to load the styles, getting 404 error. Is there a way to resolve this?
UPDATE
It seems that tasks like
grunt test
clean our .tmp directory and doesn't build it up back. It would be awesome if we could get our .tmp back at the end of grunt test task.The text was updated successfully, but these errors were encountered: