Error loading source scss files

Hi,
I’m using Sage and getting an error about “source files not loaded” where it seems to be attempting to load in the _normalize.scss from bootstrap. I get the error in firebug.
Just looked using chrome dev tools, and there I get a “source file not found” it is attempting to load in the bootstrap _badges.scss

Is there a setting somewhere that I have messed up!
Just double checked with a vanilla sage theme which doesn’t give me the error

any ideas?

If the error doesn’t happen with a vanilla Sage install, have you changed anything in the gulpfile.js ? Are you everything is downloaded with bower correctly?

@safetycat

test this fix out and report back: https://github.com/roots/sage/pull/1496/files

it looks like the files are loading but not sure where the error comes from.
I haven’t made any changes to the gulpfile.
@austin I will try this today, thanks.

@austin unfortunately this hasn’t helped.
The error I get is this:
Stylesheet could not be loaded: http://localhost/wp-content/themes/sagetheme/dist/styles/bower_components/bootstrap-sass-official/assets/stylesheets/bootstrap/_normalize.scss

However in the inspector, I do get correct sourcemap references in the css, including to _normalize.scss.

Hmm lemme try to reproduce this.

I am able to reproduce the problem. It seems that the URL to the source file (e.g. _normalize.scss) in the source map (main.css.map) doesn’t match the actual URL to that source file. But the browser still seems to be able to map the content of the source file to the name of that source file when you navigate to it via the DevTools. I guess this is because the actual content is included in the source map via the gulp-sourcemaps includeContent option, which is true by default.

It seems that after the changes in https://github.com/roots/sage/pull/1496/files, the browser can map the right source file content, but the source file URLs are still not correct like before (which produces the error reported by @safetycat).

To fix the error we have to make sure the URL to the source file are linking to the actual locations. Setting sourceRoot only doesn’t seem to work.

Chrome dev tools seem to have the correct URL, so it is Safari and Firebug/FF dev tools that are showing the incorrect URL.

Does anyone have anything further on this?
I’ve done a new sage project which doesn’t get the error, but now on my current project, it has just appeared.
haven’t changed anything except theme templates and scss files.

I’m unable to reproduce any source maps issues with the latest Sage & node dependencies