runtime exception: `Class constructor GAstVisitor cannot be invoked without 'new'`
See original GitHub issueERROR! Class constructor GAstVisitor cannot be invoked without 'new'
TypeError: Class constructor GAstVisitor cannot be invoked without 'new'
at new DslMethodsCollectorVisitor (/Users/mshima/aplicacoes/default/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js:107:47)
at Object.<anonymous> (/Users/mshima/aplicacoes/default/node_modules/chevrotain/lib/src/parse/parser/traits/looksahead.js:148:24)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/mshima/aplicacoes/default/node_modules/chevrotain/lib/src/parse/parser/parser.js:34:20)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
Reproducing:
npx generator-jhipster@latest jdl bug-tracker.jh
Related to https://github.com/jhipster/generator-jhipster/pull/19483
Issue Analytics
- State:
- Created a year ago
- Comments:12 (12 by maintainers)
Top Results From Across the Web
Class constructor cannot be invoked without 'new' in TS
The "Class constructor cannot be invoked without new" error occurs when the target property in tsconfig.json is set to lower than es6 or...
Read more >Javascript ES6 TypeError: Class constructor Client cannot be ...
When I try to execute nodemon command I always see this error TypeError: Class constructor Client cannot be invoked without 'new'.
Read more >`TypeError: Class constructor cannot be invoked without 'new ...
Bug report Getting the following error in my project: TypeError: Class constructor cannot be invoked without 'new' Looking at some related ...
Read more >RuntimeException (Java Platform SE 7 ) - Oracle Help Center
public class RuntimeException extends Exception ... Unchecked exceptions do not need to be declared in a method or constructor's throws clause if they...
Read more >changes/CHANGELOG.md - Chevrotain
runtime exception : Class constructor GAstVisitor cannot be invoked without ... The CST creation no longer relies on "new Function()" calls and can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay I realize why 6months old version 10.1.2 suddenly broke in generator-jhipster
Basically
chevrotain
10.1.2 was depending on@chevrotain/gast
^10.1.2 (with ^ minor range). So oncechevrotain
10.2.0 was released installingchevrotain@10.1.2
would pull@chevrotain/gast@10.2.0
as a dependency, but between these two versions the TypeScript compilation target changed (es5 --> ES2015) so the inheritance system is incompatible between these two versions.There are a few solutions:
es5
compilation target and then release version 11.0.0 with the new compilation target.I will try to implement #2 but if you can’t wait you may want to implement the first one.
I still don’t know why you encountered issues with 10.2.0…
hip hip hurray 😸