ppuleo / mean-seed

A seed project for building RESTful apps with node, mongo, express, and angular
5 stars 1 forks source link

Foundation SCSS fails to compile when running 'grunt server' #2

Open ghost opened 10 years ago

ghost commented 10 years ago

Hey! So I have node, grunt, SASS, git and mongo all installed. I git clone this repo, then npm install and bower update. My NODE_ENV="development". Then I run ./startdev.sh from the project root and get this (potentially an issue due to Foundation 5? I'm not sure):

all output going to: /MY_APP/server/logs/mongodb.log
Running "server" task

Running "clean:dev" (clean) task

Running "sass:dev" (sass) task
Syntax error: File to import not found or unreadable: foundation/functions.
              Load paths:
                /MY_APP
                /MY_APP/client/css
        on line 9 of client/lib/foundation/scss/foundation/_settings.scss
        from line 6 of client/css/style.scss  
  Use --trace for backtrace.
Warning: Exited with error code 1 Use --force to continue.

Aborted due to warnings.

Here's the full trace:

Running "sass:dev" (sass) task
client/lib/foundation/scss/foundation/_settings.scss:9: File to import not found or unreadable: foundation/functions. (Sass::SyntaxError)
Load paths:
  /MY_APP/ (DEPRECATED)
  /MY_APP/client/css
    from client/css/style.scss:6
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/import_node.rb:66:in `rescue in import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/import_node.rb:45:in `import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/import_node.rb:28:in `imported_file'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/import_node.rb:37:in `css_import?'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:283:in `visit_import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:152:in `block in visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:79:in `block in with_base'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:115:in `with_frame'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:79:in `with_base'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:152:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:297:in `block (2 levels) in visit_import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:297:in `map'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:297:in `block in visit_import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:88:in `block in with_import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:115:in `with_frame'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:88:in `with_import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:294:in `visit_import'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:152:in `block in visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:79:in `block in with_base'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:115:in `with_frame'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/stack.rb:79:in `with_base'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:152:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/base.rb:52:in `block in visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/base.rb:52:in `map'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/base.rb:52:in `visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:161:in `block in visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:173:in `with_environment'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:160:in `visit_children'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/base.rb:36:in `block in visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:180:in `visit_root'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/base.rb:36:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:151:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/visitors/perform.rb:8:in `visit'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/root_node.rb:36:in `css_tree'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/tree/root_node.rb:20:in `render'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/engine.rb:274:in `render'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/exec.rb:384:in `process_result'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/exec.rb:43:in `parse'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/lib/sass/exec.rb:22:in `parse!'
    from /Library/Ruby/Gems/2.0.0/gems/sass-3.3.0.rc.4/bin/sass:13:in `<top (required)>'
    from /usr/bin/sass:23:in `load'
    from /usr/bin/sass:23:in `<main>'
ppuleo commented 10 years ago

Hi propelict, thanks for trying this out! It looks like the path to the Foundation functions sass partial is no longer resolving correctly in latest version of Foundation. This could be a misconfiguration in my Gruntfile SASS task (maybe I need to use the expand option?) or the fact that the functions sass partial wasn't originally included (it was commented out by default in previous versions of Foundation).

Since we don't use these functions, the quick fix I've pushed for now is to remove the settings partial include from client/css/style.scss. I'll look into the problem and see what's happening. Thanks!

ghost commented 10 years ago

Thanks Phillip! Not to get too off-topic, but I tried commenting out that import line, and startdev.sh runs successfully - though I am noticing some wonky CSS/display issues. Was this seed written with Foundation 4 in mind?

Thanks for getting back to me so quickly :)

ppuleo commented 10 years ago

I also fixed a path problem with jQuery so that may be causing some of the issues you are seeing. The mean seed was written for Foundation 5; what kinds of CSS/display issues are you seeing?

ghost commented 10 years ago

Your latest commits fix the issue I was having in the initial bug report - thanks!

screen shot 2014-02-17 at 7 37 14 pm

Stuff like the above is what I mean by display issues. It's possible I just don't have all the necessary CSS compiled.. I'm gonna play with it a bit more and see exactly what's going on. FWIW, the compiled style.css is loading properly.

ghost commented 10 years ago

So style.css was the only CSS being loaded, and at 62KB unminified, it definitely wasn't including all of the Foundation classes. I've added a static link to lib/foundation/css/foundation.min.css in my index.ejs and everything looks fine, but I'm pretty sure this defeats the purpose of using SASS/SCSS. :)