404s in console for less files?

HI All,

I’m using the latest version of roots. Still making my way around the changes.

I’ve getting 404s in the console for less files. I’m assuming it has something to do with this:

      sourceMap: true,
      sourceMapFilename: 'assets/css/main.css.map',
      sourceMapRootpath: '/app/themes/roots/'

my roots path is completely different, since i’ve changed the name of the theme.

regardless, i’ve attached an image to highlight what i’m talking about.

I really just want to pop down to the console to look at debug info without having this all come in first.

Any help is much appreciated.

Thanks.

I’m assuming you want to be using source maps? http://roots.io/using-less-source-maps/

If so, like that article mentions, you’ll want to change the path to something like /wp-content/themes/theme_name/ or lease it at /app/themes/theme_name if you’re using bedrock I think.

Or you could probably just set it to false, and continue with normal roots development.

Thanks for the response.

I hadn’t changed anything in Gruntfile.js at the start of the project.

After taking a look at the gruntfile, I did set it to false before I made this post, and did grunt build. It’s still looking for the source map.

Also, I changed the line to reflect the correct location of my theme, and grunt build… that didn’t work either.

Awesome.

You actually have to run only ‘grunt’ when you make this change:

http://discourse.roots.io/t/cant-get-source-maps-working/804/16

“Please, be aware that you have to STOP your “grunt watch” thread if you have it running and retype grunt - without the watch - for the changes to take.”

Thanks for the help. It’s working now.

1 Like

If you remove the line

define(‘WP_ENV’, ‘development’);

The 404 on the less files are gone.