Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Gulp Basics Compile Sass with Gulp Add Source Maps to your SaSS

Console showing CSS file origin not SASS file origin.

The dev tools on chrome on my pc are showing the css file location not the sass file location even with the map being in my css folder?

4 Answers

Samuel Fortunato
Samuel Fortunato
20,229 Points

This happened to me. Assuming you did everything else right, and that you're using Chrome, just start up http-server, go to Chrome Dev Tools, and right click the refresh button at the top. Select "Empty Cache and Hard Reload". You can also just hit Ctrl + Shift + R, or Cmd + Shift + R on Mac. You have to have Dev Tools open to do this.

If you are using another browser. you'll have to figure out how to empty the cache and reload. A quick googling will probably help.

Kirill Pahl
Kirill Pahl
13,924 Points

If you are using Chrome on windows, it just does not catch mappings sometimes. Try Firefox, at least it helped me =)

Matthew Barrus
Matthew Barrus
16,731 Points

if this happens, check the bottom of the .css file for a line like:

/*# sourceMappingURL=application.css.map */

You probably compiled the SASS before adding the source mapping. When Huston showed the sass references in dev tools, he still had a source map referenced in the css file

Should that line be there or not? I followed the steps of the video: first complied the sass, then created the map. But still the console is showing the css file and not the sass file. ??

Steven Parker
Steven Parker
218,707 Points

Sass only exists on the server. It gets converted to CSS before going to your browser.

Since dev tools are in the browser, they won't see any sources that were processed or compiled on the server.

It was specifically an issue for one video using the scss map that huston gave us with the project. Later in another video when we made another map it worked fine.