Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Gulp Basics Compile Sass with Gulp Source maps for JavaScript too

Kirsty Pollock
Kirsty Pollock
14,261 Points

Can't get the Chrome console to show the error

In the Gulp Basics "Source maps for JavaScript too" video, we deliberately introduce an error into one of the js files - but I cannot ever see the error in the console in the dev tools in Chrome... The erroneous code line is definitely in the app.js file, as I can see by looking at the script via the Chrome dev tools... What have I forgotten?

If the created bug is in the code and doesn't show in the dev tools, does it show in the command line?

7 Answers

steven alston
steven alston
16,292 Points

Perform a hard reload on the window. right click the refresh symbol with your dev console open in chrome.

Taylor Plante
Taylor Plante
22,283 Points

Kind of strange because this server is running locally, but I actually needed to clear my cache, an older version of the file was loading (meaning "var foo = bar" was not in the file)

Tom Geraghty
Tom Geraghty
24,174 Points

This comes up more often than you'd think. Racking your brain trying to figure out why your new style or new script didn't load.

Clearing cache manually works but for Chrome I found you can hit Ctrl+Shift+r to do a force reload of the page that doesn't use any cached resources.

if errors aren't showing in chrome dev tools we're all in a lot of trouble :), try just adding

var elephant = lion;

as long as those variable don't already exist it will throw errors, also make sure you have the console tab selected in dev tools.

nope.

Had the same problem. Athough mine was caused by gulp-concat not being installed during npm install. The solution was to re-install gulp-concat for the local dev environment npm install gulp-concat --save-dev

Yea i cant get it to show either.

Same here. I can't see the error by the browser, but it appears in git bash after running "gulp concatScripts".

..\gulpfile.js:39
var foo = bar;
Sam Gord
Sam Gord
14,084 Points

its really weird that it doesn't work and show the error for me too . even though i hard reloaded my page plus cleared cache and hard reloaded too ( by right clicking on the refresh button and choosing the option for it! ) its weird.

Chris Phua
Chris Phua
6,884 Points

when i change my src="app.min.js" to src="app.js", it shows me the correct location of the error as shown in the video. i dunno it's right or not but i hope this helps.