Loading less files error

Hi,
I found there are a bunch of less files loading errors when loading pages on WP during logging in with path /app/themes/roots/assets/less/components/.

on define(‘WP_ENV’, ‘development’)

Why the less files are loaded? and where can I change the path so it works?

Thanks much,
Springgrass

I’m not sure I understand your question or your issue. If you’re experiencing errors please describe when you encounter them, where they are, and the exact error message you see.

1 Like

@cfx, When I load Wordpress pages on Safari, and view network logs, there are a lot of LESS file 404 errors:

failed to load resource: the server responded with a status of 404 (NOT FOUND)

/app/themes/roots/assets/vendor/boostrap/less/print.less
/app/themes/roots/assets/vendor/boostrap/less/normalize.less…

This is happening when I have define(‘WP_ENV’, ‘development’) set on wp-config file. If I take this off, the errors are gone. Also, I didn’t see the errors on Firefox either.

So why the LESS files are loaded? and where can I change the path so it works? I wonder if this has to do with LiveReload, so less mapping.

Thanks much.

You can either set sourceMap to false or change sourceMapRootPath to your theme’s root directory in your Gruntfile.js.

After doing one of the above you will need to run grunt or grunt dev to re-compile your development assets.

I was eventually going to look into fixing this so this answered my question. Thank you!

it work! Thanks much :slight_smile: