yeoman / generator-webapp_DEPRECATED

Yeoman generator that scaffolds out a front-end web app
http://yeoman.io
975 stars 309 forks source link

Problem with bower components #603

Closed StfBauer closed 8 years ago

StfBauer commented 9 years ago

Currently I get the error that components stored in the bower_components cannot be found.

Warning: Running "sass:server" (sass) task
    >> file to import not found or unreadable: susy/sass/susy
    >> Current dir: /Volumes/Local/code/customer/app/styles/
    >>   Line 8  Column 9  app/styles/main.scss

I tried various different ways to import those components but noting worked. In css I tried the following thing and this worked fine in older versions too.

@import "susy/sass/susy";

Any suggestions? Thanx.

silvenon commented 9 years ago
@import "bower_components/susy/sass/susy";

But grunt wiredep should have injected it. Did you run it?

gaboesquivel commented 9 years ago

make sure sussy is in bower.json deps for it to be injected thru wiredep. Wiredep injects the file specified in the main property in the component's bower.json file. In this case "main": "sass/_susy.scss" , see https://github.com/ericam/susy/blob/master/bower.json

https://github.com/taptapship/wiredep#how-it-works

StfBauer commented 9 years ago

Thank you for your replies. Somehow it looks like this issue was related to node version 4.1.0. After I downgraded back to v0.12.7 it works fine again. The only issue I currently have that browser-sync/livereload is not working. I see a lot of messages in the console that says.

Failed to load resource: Could not connect to the server.

The url it tries to load is: http://localhost:9000/browser-sync/socket.io/?EIO=3&transport=polling&t=1442552633077-27

Worked fine before. Any suggestion on that ?

Update: After first run I had that problem. Dug deeper into the problem. Changes in the app directory will refresh the browser but not changes will be stored in the .tmp folder. Updates to the sass file will not reload the browser. Changes for example in the index.html will reload the browser.

gaboesquivel commented 9 years ago

yeah, it seems that renaming .tmp to tmp (without the dot) fixes that problem, see https://github.com/yeoman/generator-webapp/issues/585

StfBauer commented 8 years ago

tried it and yes it works now without an exception!! Thank you very much for your support.

To keep the tmp files apart from the other files I renamed it to _tmp. An this works pretty well too.

silvenon commented 8 years ago

The fix is released in v1.1.0.