Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Getting 404s on sourcemaps #67

Open

Description

@joshbedo

Recently with our builds we've been getting 404s on all of our sourcemaps. I tried clearing out .gobble, .gobble-build and also node_modules/.bin/gobble but haven't had any luck solving the problem. I saw another issue recently posted about sourcemaps and was wondering if it was related? Looking for any kind of help since we can't debug right now :)

Activity

  1. Rich-Harris commented on May 6, 2015

    @Rich-Harris
    Contributor

    Sorry about this - yes, I'm fairly sure it's related. I just merged #66 which ought to fix it, I'm just tidying up a couple of other bits and pieces then I'll push a new version out, hopefully by the end of the day.

  2. Rich-Harris commented on May 6, 2015

    @Rich-Harris
    Contributor

    @joshbedo I just released 0.10.0, which should fix this issue. Let me know if not, thanks

  3. Rich-Harris commented on May 6, 2015

    @Rich-Harris
    Contributor

    Oh, and you'll probably want to npm install -g gobble-cli@latest while you're at it, otherwise some of the logging will look borked

  4. joshbedo commented on May 6, 2015

    @joshbedo
    Author

    So i just tried to upgrade and i'm having issues with peerDependency requirements. It says i need 0.7.1 for grunt-gobble. Any ideas or suggestions? Thanks!

  5. Rich-Harris commented on May 6, 2015

    @Rich-Harris
    Contributor

    Ack, I struggle with npm's error messages. Have to dash out of the office right now so can't investigate, but does this article help any?

  6. evs-chris commented on May 6, 2015

    @evs-chris
    Contributor

    You can manually edit the gobble-grunt package.json to have 'gobble": "^0" as a quick workaround.

  7. joshbedo commented on May 6, 2015

    @joshbedo
    Author

    Hey @evs-chris i tried what you suggested and i'm still get the same error.

  8. evs-chris commented on May 6, 2015

    @evs-chris
    Contributor

    That's odd... is there more than one grunt-gobble in your node_modules tree? find . -name grunt-gobble or something like that from your project root should turn up any instances of grunt-gobble, and editing their package.json files should skirt the error. I wouldn't expect there to be more than one. What npm command are you running that's throwing the error?

  9. joshbedo commented on May 6, 2015

    @joshbedo
    Author

    So we only have one instance of grunt-gobble i modified its package.json to use ^0 and that seems to have fixed the npm install error. Now when building i'm getting this error.

  10. evs-chris commented on May 6, 2015

    @evs-chris
    Contributor

    That sourcemap transform error should not be fatal. Does your project still serve correctly?

  11. joshbedo commented on May 6, 2015

    @joshbedo
    Author

    Yes it does, its just throwing the error on vendors on a few other areas.. not sure why or how to fix.. i've never seen an EMFILE error.

  12. joshbedo commented on May 6, 2015

    @joshbedo
    Author

    Although now i'm noticing sometimes it stops the build from finishing. So it doesnt always serve the page.

  13. Rich-Harris commented on May 6, 2015

    @Rich-Harris
    Contributor

    Whoops, that EMFILE is probably happening because the update version of sander was using fs instead of graceful-fs. I've just fixed that and released a new version. If you remove gobble from node_modules and reinstall it, it'll get the latest sander and you should no longer see that error.

    Also, if you npm install -g gobble-cli@0.4.2 you'll get slightly nicer logging

  14. joshbedo commented on May 7, 2015

    @joshbedo
    Author

    So i'm still getting a similar error after upgrading :\

  15. Rich-Harris commented on May 7, 2015

    @Rich-Harris
    Contributor

    Is the build failing as a result? ENOENTs should be harmless (they do need better logging admittedly, it looks positively alarming when you see them like that), in theory it'll just skip those files

  16. 1 remaining item

  17. Rich-Harris commented on May 7, 2015

    @Rich-Harris
    Contributor

    @aubergene can you share your gobblefile (or at least the bit with sass and the subsequent merge)? That's a weird place for it to be looking for the sourcemap, which makes me wonder if it's getting confused with relative paths or something.

    Aaaand now that I look at @joshbedo's screenshot again, it looks like it's exactly the same problem. Are you using sass as well Josh?

  18. Rich-Harris commented on May 7, 2015

    @Rich-Harris
    Contributor

    Ah, I've found the problem. gobble-sass was generating a sourcemap without understanding where it was writing the actual CSS file to, so the relative path was getting messed up. Not a problem with gobble itself (though it was a recent update to gobble that exposed the problem) - will have a fix released shortly

  19. Rich-Harris commented on May 7, 2015

    @Rich-Harris
    Contributor

    I've just released gobble-sass@0.4.1, which ensures the relative sourcemap path is relative to the right thing. I also updated gobble itself, which contains a couple of small fixes related to CSS sourcemap URLs.

  20. joshbedo commented on May 7, 2015

    @joshbedo
    Author

    Hmm it seems like after upgrading im still getting the same error.

  21. joshbedo commented on May 7, 2015

    @joshbedo
    Author

    Not as many errors though, only three this time! 👏 One looks really weird, i think its because of bower components. Also thanks so much for the help!

  22. Rich-Harris commented on May 7, 2015

    @Rich-Harris
    Contributor

    Those are weird errors - the 'cannot call method 'trace' of undefined', 'unexpected end of input' and ENOENT on jquery/)(.*) are particularly concerning. I don't suppose you're in a position to share the repo, or a stripped-down version that reproduces those errors?

  23. joshbedo commented on May 7, 2015

    @joshbedo
    Author

    Its a really large repo, i can share the structure and bower/package.json file? What would be the most helpful?

  24. Rich-Harris commented on May 7, 2015

    @Rich-Harris
    Contributor

    If you can put gobblefile.js, [bower|package].json, and a bare-bones app folder, maybe with a couple of .js, .coffee and .es6.js files in app/assets, that ought to do the trick. Thanks!

  25. aubergene commented on May 8, 2015

    @aubergene

    I updated gobble and gobble-sass and it ran without errors, thanks! However the sourcemap is generated with the wrong path, so it doesn't work in the browser, the output was "sources":["../.gobble-build/02-merge/1/main.scss"].

  26. Rich-Harris commented on May 8, 2015

    @Rich-Harris
    Contributor

    @aubergene There's an open issue for that - #69 - basically, as far as node-sass is concerned, the source file is 02-merge/1/main.scss, and we need to jump through some hoops to trace it back to the actual file. It should still work though, because the sourcesContent is populated:

    screen shot 2015-05-08 at 2 53 20 pm

    screen shot 2015-05-08 at 2 55 13 pm

    Are you not seeing the main.scss in devtools?

  27. aubergene commented on May 11, 2015

    @aubergene

    I only see main.css, even though sourcesContent is in the sourcemap and looks correct. Here's the example repo I've been playing with https://github.com/aubergene/gobble-example

  28. Rich-Harris commented on May 11, 2015

    @Rich-Harris
    Contributor

    Do you have CSS sourcemaps enabled in devtools? Your repo works for me... You need to check this box:

    screen shot 2015-05-11 at 9 33 01 am

    Also, I released a new version of gobble-sass which upgrades to the just-released node-sass v3.0.0

  29. aubergene commented on May 11, 2015

    @aubergene

    Yep, it's enabled. It works fine on both my work machines, so it's probably something odd with my settings on laptop. I think it's fine to close this ticket. Thanks!

  30. Rich-Harris commented on May 11, 2015

    @Rich-Harris
    Contributor

    It works fine on both my work machines

    computers ¯\ _ (ツ) _ /¯

    Will leave this open for the time being, for @joshbedo

  31. joshbedo commented on May 11, 2015

    @joshbedo
    Author

    Sorry i havent had a chance to post the files, i'll try to post something tonight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions