-
Notifications
You must be signed in to change notification settings - Fork 204
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
runtime exception: Class constructor GAstVisitor cannot be invoked without 'new'
#1845
Comments
Hello @mshima I'm not seeing any issues in a small example consuming latest (10.2.0) chevrotain via commonjs. Also the latest tag of
Can you provide a way for me to debug this?
|
You can install jhipster locally and run it.
Updating to chevrotain@10.2.0 fails too:
This is a big issue for jhipster since it breaks every new installation. I probably won't manage to debug this today. |
I wonder if this is somehow related to how npx runs things. {
"name": "blah",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"yo": "yo jhipster jdl bug-tracker.jh",
"npx": "npx jhipster jdl bug-tracker.jh"
},
"author": "",
"license": "ISC",
"dependencies": {
"generator-jhipster": "7.9.2"
}
} Unless these two commands are not equivalent? |
Actually these two commands may not be equivalent, I am not sure if yeoman does a local lookup in closest I am not sure if the arguments part is equivalent though... |
At package.json scripts npx is not required, use plain In this case, npx is just a wrapper for the local node_modules bin. So it’s just like
You can install globally. I’m just used to install locally. The jhipster bin is required. Yo will not work. |
Okay I realize why 6months old version 10.1.2 suddenly broke in generator-jhipster Basically There are a few solutions:
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... |
I did some debug and the update to 10.2.0 broke because of this change: Operators Removing But I have not clue if that's the correct approach. |
It is safe to remove the I am evaluating removing it as it seems fragile |
Class constructor GAstVisitor cannot be invoked without 'new'
I've released version 10.3.0 with ES5 artifacts and locked semver versions. |
The problem was resolved for me on the local package.json + npx scenario (after I still get an error with running directly with global npx package install, but I am guessing that is because chevrotain does not get reinstalled on every perhaps it would be a good safe practice to also release a new patch version of jhipster... |
Transitional dependencies merged at jhipster/generator-jhipster#19483. Thanks @bd82 |
hip hip hurray 😸 |
Reproducing:
Related to jhipster/generator-jhipster#19483
The text was updated successfully, but these errors were encountered: