AndreasMadsen / trace

Creates super long stack traces
https://trace.js.org
MIT License
194 stars 18 forks source link

Failing on node 0.12 #20

Closed Jimbly closed 8 years ago

Jimbly commented 8 years ago
node_modules/trace/trace.js:3
const chain = require('stack-chain');
^^^^^
SyntaxError: Use of const in strict mode.

Can you flag an older version in npm, that does not require ES2015, to be installed on node <= 0.12.x?

AndreasMadsen commented 8 years ago

I think version 1.1.0 may work on node 0.12.x, but I'm not sure.

This module uses a node.js feature called async_wrap, unfortunately this is only half supported in 0.12.x, versions before that don't have it at all. It is possible to use those parts and give some results, be it will suffer from the same memory issues that 4.x.x also have now. So it not about the ES2015 features (I would just refrain from using them then), it is about async_wrap.

I know 4.x.x will get its async_wrap implementation updated to correspond to the much better version there is in 5.x.x, but I don't know if they will update 0.12.x too. I've opened an issue requesting it to be updated: https://github.com/nodejs/node/issues/4592

Jimbly commented 8 years ago

Yeah, I tried manually grabbing the latest 1.x release (1.2.0) and it seemed to work (didn't crash, seemed to give me slightly better call stacks, though I didn't look too closely as I tracked down the issue I was looking into through other means).

AndreasMadsen commented 8 years ago

The Node LTS WG has agreed that node v0.12 will not get the async_wrap feature updated. See: https://github.com/nodejs/node/issues/4592