question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Soucemap misconfigured? Shows a blank source file

See original GitHub issue

Sourcemap generated by clean-css gave me the correct file name and line number, as seen on the highlighted selector below. But when i click on it, it leads me to a blank source file.

jepretan layar 2017-03-26 pada 00 35 05 jepretan layar 2017-03-26 pada 00 36 47

This happens in Safari and Firefox as well. But these browsers also gave me this message: “The configuration file does not exist”.

i’m using Grunt to concat an array of bower-installed css files. Which i got from wiredep. Initially i was using the grunt-contrib-cssmin plugin. When that fails, i tried running the cleancss CLI directly via grunt-exec. But both give the same result.

using the Grunt plugin:

cssmin: {
    options: {
        sourceMap: true
    },
    target: {
        files: [{
            src: [require('wiredep')().css],
            dest: '<%= conf.assets_path %>/css/plugins.css'
        }]
    }
}

using the cli:

exec: {
    cleancss: {
        cmd: 'cleancss --source-map '+ require('wiredep')().css.join(' ') +' -o css/plugins.css',
        cwd: '<%= conf.assets_path %>'
    }
}

here’s the output of require('wiredep')().css if you’re wondering.

[ '/Users/username/Sites/projectname/public/bower_components/fullpage.js/dist/jquery.fullpage.css',
  '/Users/username/Sites/projectname/public/bower_components/slick-carousel/slick/slick.css',
  '/Users/username/Sites/projectname/public/bower_components/slick-carousel/slick/slick-theme.css' ]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
rizkysyazulicommented, Mar 29, 2017

@jakubpawlowicz ah thx. btw, if u haven’t started. i can try to make a trimmed down version of my site to help replicate the issue.

0reactions
jakubpawlowiczcommented, May 9, 2017

Please comment further if needed!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing sourcemaps or a misconfigured package with Create ...
Basically, we are generating source maps for files that we do not ship with the package. We only distribute the dist folder, but...
Read more >
Issues with require.js and sourcemaps when compiling ...
As a quick fix i edited the load fn on the require.js file and all my dependencies load correctly, but then the sourcemaps...
Read more >
4 Reasons Why Your Source Maps are Broken - Sentry Blog
4 Reasons Why Your Source Maps are Broken · Missing or incorrect source map directive · Missing original source files · Bad source...
Read more >
Debugging JavaScript with Source Maps - Rollbar
Source maps describe how the compiled code is related to your original source code. The debugger can then show the original code you...
Read more >
Javascript Source map detected - Vulnerabilities - Acunetix
Client side Javascript source code can be combined, minified or compiled. A source map is a file that maps from the transformed source...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found