I am using grunt with livereload to compile my less files. Grunt also generates source maps so that I can directly see in my browser, in which LESS files css code is located.

But often when I click to inspect it, then I get

Could not load content for https://www.company.de/pub/static/frontend/company/fresh/de_DE/css/source/lib/extend/main/header/header_main.less (HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE)

Why is this happening and how can I prevent it?

  • Did you find a fix? As an ugly hack I remove the pub from the URL to inspect in the browser. Are you using Valet?
    – Holly
    Apr 7, 2021 at 3:46

1 Answer 1


As a workaround you can replace sourceMapRootpath: '/' in dev/tools/grunt/configs/less.js with outputSourceFiles: true.

REF: https://github.com/gruntjs/grunt-contrib-less/tree/v1.4.1#outputsourcefiles

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.