Foundation-sites: [Build] Normalize should be a Bower Dependency in project and Templates

Created on 28 Nov 2016  路  11Comments  路  Source: foundation/foundation-sites

Running 6.3 get's this error

Error: File to import not found or unreadable: normalize
       Parent style sheet: bower_components/foundation-sites/scss/foundation.scss
        on line 9 of bower_components/foundation-sites/scss/foundation.scss
>> @import "normalize";
   ^

Normalize needs to be added as a real dependency in the Foundation project. Also needs to be added to project templates

  • zurb/foundation-sites-template
  • zurb/foundation-zurb-template
templates

Most helpful comment

I'm also having the same problem when installing using npm (npm install foundation-sites) and trying to use my own scripts to compile the sass files.

All 11 comments

@ncoden Are you able to look into this one?

@rafibomb I can, but not for now. Maybe next week. :/

Now normalize-scss is imported and compiled inside foundation-sites as a real dependency, I don't see what you mean by "needs to be added to project templates". foundation-zurb-template require "foundation-sites": "~6.2.3", not the foundation's dependencies. 馃

Is there a way to get around this to test?

When installing via npm and then compiling the SCSS I get an error saying it can't find the normalize file.

The path in foundation.scss has @import "normalize";. Which doesn't exist in that directory.

@mediabeastnz If you want to test the merged fix above, you can do:

$ git fetch origin 17e1179b5f0fe1d47448dd1636f7f063fb248e64
$ git checkout FETCH_HEAD

But I think there is still a bug. @import "normalize"; works for the compilation of foundation.css because the path to the dependency files node_modules/normalize-scss/sass is included in gulp. This shouldn't work with a project which include foundation partials...

I'm also having the same problem when installing using npm (npm install foundation-sites) and trying to use my own scripts to compile the sass files.

so... I'm a little confused about this because

  1. the current build is working for me... what am I doing differently?
  2. this seems to overly subscribe how your dependencies are located - what happens if someone uses a custom node modules path, or is using bower instead of npm? Paths should be a part of the build, not the src

oops the above should be in the PR... fixing

Today we also ran into this. When is there going to be a release for this?

@michaelBenin We are working on it. See https://github.com/zurb/foundation-sites/pull/9458

Was this page helpful?
0 / 5 - 0 ratings