Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uninformitive crash dump is generated when 'debugger;' is used #3766

Closed
d3x0r opened this issue Sep 7, 2020 · 2 comments · Fixed by #3769
Closed

Uninformitive crash dump is generated when 'debugger;' is used #3766

d3x0r opened this issue Sep 7, 2020 · 2 comments · Fixed by #3769

Comments

@d3x0r
Copy link

d3x0r commented Sep 7, 2020

  • Rollup Version:2.26.10 (installed with npm -g rollup)
  • Operating System (or Browser):Windows 10
  • Node Version (if applicable):12.something
  • Link to reproduction (IMPORTANT, read below): Reproduction link

Expected Behavior

Emit a sensible error that could help me fix my code? Support emitting debugger; in an if statement?

Actual Behavior

Fatal error from using 'debugger;' statement, and it's very unclear where the error has occured; the error only reports information about rollup's stack, and not exactly what it's having an issue with.'

Example output

tst.js → stdout...
[!] TypeError: this.context.nodeConstructors[esTreeNode.consequent.type] is not a constructor
TypeError: this.context.nodeConstructors[esTreeNode.consequent.type] is not a constructor
at IfStatement.parseNode (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:7310:27)
at new NodeBase (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:2823:14)
at new IfStatement (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:7264:9)
 at Program$1.parseNode (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:2937:27)
 at new NodeBase (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:2823:14)
at new Program$1 (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:8243:9)
 at Module.setSource (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:10075:20)
at ModuleLoader.addModuleSource (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:18158:20)
 at async ModuleLoader.fetchModule (C:\Users\d3x0r\AppData\Roaming\npm\node_modules\rollup\dist\shared\rollup.js:18212:9)
at async Promise.all (index 0)
M:\tmp\test_rollup>

I was working along... changed something and then boom nothing worked; it was very disheartening, and I had to find the command script, build the command line with node --inspect-brk backtrack from the error in an async stack (which is often very uninformative itself). And there is no information about which file contained the error; that is I include {sw.js -> network.js which the second file is the one with the error, but all I could fathom remotely from the error reported was 'sw.js' which is essenctially just the command line option passed.

@lukastaegert
Copy link
Member

Could you please use our issue template and add a reproduction link? Sorry for the inconvenience, but we ask everyone to do that to help us structure our issues and stream-line triage. But it seems the bug triggers on the REPL so you can use that link: https://rollupjs.org/repl/?version=2.26.10&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmlmKCUyMHRydWUpJTIwZGVidWdnZXIlM0IlMjAlMjIlMkMlMjJpc0VudHJ5JTIyJTNBdHJ1ZSU3RCU1RCUyQyUyMm9wdGlvbnMlMjIlM0ElN0IlMjJmb3JtYXQlMjIlM0ElMjJlcyUyMiUyQyUyMm5hbWUlMjIlM0ElMjJteUJ1bmRsZSUyMiUyQyUyMmFtZCUyMiUzQSU3QiUyMmlkJTIyJTNBJTIyJTIyJTdEJTJDJTIyZ2xvYmFscyUyMiUzQSU3QiU3RCU3RCUyQyUyMmV4YW1wbGUlMjIlM0FudWxsJTdE

This looks like an important bug at first glance.

@lukastaegert
Copy link
Member

Fix at #3769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants