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: Class CustomErrorStrategy extends undefined antlr4 DefaultErrorStrategy #1046

Open
glarivie opened this issue Feb 25, 2024 · 4 comments

Comments

@glarivie
Copy link

glarivie commented Feb 25, 2024

Actual behavior

Using @forestadmin/[email protected] with @forestadmin/[email protected] throws the following error:

node_modules/@forestadmin/datasource-customizer/dist/decorators/search/custom-parser/custom-error-strategy.js:4
class CustomErrorStrategy extends antlr4_1.DefaultErrorStrategy {
                                           ^
TypeError: Class extends value undefined is not a constructor or null
    at Object.<anonymous> (node_modules/@forestadmin/datasource-customizer/dist/decorators/search/custom-parser/custom-error-strategy.js:4:44)

Context

@DayTF
Copy link
Contributor

DayTF commented Feb 26, 2024

Hello @glarivie,

Could you provide more information on when you're encountering this issue, I have not been able to reproduce using @forestadmin/[email protected]

@glarivie
Copy link
Author

After investigating, it turns out that the cause of the problem is our packages manager: yarn 4. The problem does not occur with a package manager such as npm or yarn 1. And I can confirm that @forestadmin/[email protected] works correctly with yarn 4.

@glarivie
Copy link
Author

glarivie commented Mar 15, 2024

I don't know why but [email protected] (instead of [email protected]) is installed for @forestadmin/[email protected] and @forestadmin/[email protected]. I need to use this trick in my package.json to deal with this issue :

"resolutions": {
  "antlr4": "4.13.1-patch-1"
}

@tommyfr
Copy link

tommyfr commented Jun 10, 2024

I had the same issue. Thanks a lot for the tip @glarivie !

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

3 participants