You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.../uglifysanity.min.js:1
exports, require, module, __filename, __dirname) { console.log("1"),goober(),c
^
.../uglifysanity.js:6
console.log('5'); <---------- Wrong line!
^
ReferenceError: goober is not defined
at Object.<anonymous> (.../uglifysanity.js:6:1)
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 Module.require (module.js:364:17)
at require (module.js:380:17)
at [stdin]:5:1
at Object.<anonymous> ([stdin]-wrapper:6:22)
at Module._compile (module.js:456:26)
Expect this instead:
.../uglifysanity.js:2
goober();
^
In Chrome, this seems to work fine. Just not working in Node.js. I'm using source-map-support@0.2.8 and uglify-js@2.4.15 and Node v0.10.25.
Activity
julien-f commentedon Apr 7, 2015
It seems that this error is due to the header Node prepends in memory to the module:
This header impacts the column number in the stacktrace which must be corrected before mapping the position.
julien-f commentedon Apr 20, 2015
@evanw Any updates on this?
pspeter3 commentedon May 16, 2015
The problem here is that sometimes we want to remove the header and sometimes we want to maintain it. It is unclear when one is preferable.
Fixing node header issue.
Better fix for #36 (thanks @pspeter3).