This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Description
It seems that node internally prepends some code to wrap a script into a module. However, it fails to correct for this in the stack traces of any errors that occur on line 1 of a script. This manifests itself e.g. in uglified files where EVERYTHING is on line 1 of the script. This renders sourcemaps useless.
Example:
Output (note the column number of the first stack frame is larger than the line in the code):
c:\issue.js:1
(function (exports, require, module, __filename, __dirname) { throw new Error(
^
Error: bla
at Object.<anonymous> (c:\issue.js:1:69)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3