incorrect sourcemap file path in 1.6.2 #2882

mark-hahn opened this Issue Mar 24, 2013 · 4 comments

5 participants


I'm seeing an incorrect path in 1.6.2. I'm using chrome Version 26.0.1410.40 beta-m.

This just started happening today and Friday it worked fined with my same source code and same version of coffeescript. I just tried switching from Chrome stable to beta (see version above) but it made no difference.

The correct file path should be /ri/src/pages/js/client_helpers.cof but I'm getting /ri/src/src/pages/js/client_helpers.cof from chrome to my server.

The sourcemap says ....

 "version": 3,
  "file": "proj_metadata_client.js",
  "sourceRoot": "../../../../..",
  "sources": [

I can patch the map to work by changing "../../../../.." to "../../../../../.." or by removing src/ from the sources property.


I believe I am getting this same issue. In Coffeescript 1.6.1:

  "version": 3,
  "file": "client.js",
  "sourceRoot": "",
  "sources": [

In Coffeescript 1.6.2:

  "version": 3,
  "file": "client.js",
  "sourceRoot": "..",
  "sources": [

Sadly, this pathing strategy goes outside of my webroot.

I could possibly redefine my build script to do multiple compiles, rooted in different directories if this change in 1.6.2 is to support something else that wasn't working properly.


It would be nice to be able to specify a root from the cmd line, and have CS base the path from that root.


Is this issue still occurring on master? If it is -- what's the best way for one of us to reproduce it?


I have the same problem.

CoffeeScript version 1.7.1

Command goes like this:

coffee --map -wc mylib/media/some_folder mylib/media/other_folder myapp/media/coffee

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