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

TypeError: this.context.nodeConstructors[esTreeNode.consequent.type] is not a constructor #3767

Closed
gregid opened this issue Sep 7, 2020 · 1 comment

Comments

@gregid
Copy link

gregid commented Sep 7, 2020

  • Rollup Version: 2.26.7 and higher
  • Operating System (or Browser): Windows 10
  • Node Version (if applicable): v14.5.0
  • Link to reproduction (IMPORTANT, read below): Unable to reproduce outside of my project yet

I am currently trying to make a reproducible case and will update this issue when the culprit is found. The error message is pretty meaningless so finding the cause is problematic.

Expected Behavior

After upgrading from 2.26.6 where rollup is working correctly to 2.26.7 (and 8,9,10) it should work the same

Actual Behavior

Instead the following error is printed

[!] 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 (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:7311:27)
    at new NodeBase (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:2824:14)
    at new IfStatement (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:7265:9)
    at BlockStatement$1.parseNode (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:2938:27)
    at new NodeBase (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:2824:14)
    at new BlockStatement$1 (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:5983:9)
    at FunctionExpression$1.parseNode (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:4340:21)
    at new NodeBase (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:2824:14)
    at new FunctionNode (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:4250:9)
    at new FunctionExpression$1 (E:\Projects\!Current\morpho\node_modules\rollup\dist\shared\rollup.js:7248:1)

Works fine with <= 2.26.6 so it is a regression problem related to #3752: https://github.com/rollup/rollup/pull/3752/files#diff-df354c9e51f1407474114304de5c8429R73

@gregid
Copy link
Author

gregid commented Sep 7, 2020

OK the error is caused by the same problem as in #3766. Using debugger in the code is causing rollup to fail. Since this is a duplicate I am closing the issue.

@gregid gregid closed this as completed Sep 7, 2020
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

No branches or pull requests

1 participant