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

antlr4 Trees module missing in JS runtime #4715

Open
ZengLawrence opened this issue Oct 17, 2024 · 3 comments · May be fixed by #4718
Open

antlr4 Trees module missing in JS runtime #4715

ZengLawrence opened this issue Oct 17, 2024 · 3 comments · May be fixed by #4718

Comments

@ZengLawrence
Copy link

ZengLawrence commented Oct 17, 2024

I am trying import Trees module from JS runtime, but get "Cannot find module 'antlr4/tree/Trees' or its corresponding type declarations" error. See below screenshot.

Screenshot 2024-10-16 at 8 52 55 PM

import Trees from "antlr4/tree/Trees";

Based on the source code Trees.js, I should be able to import use above syntax.

Can someone look into why this module was not packaged into the runtime?

Target runtime: JavaScript / Typescript
Runtime version: 4.13.2

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Oct 17, 2024 via email

@ZengLawrence
Copy link
Author

Tried import directly from 'antlr4' and got the same error. See below.

import { Trees } from "antlr4";

Screenshot 2024-10-17 at 6 50 15 PM

The problem might be there is no Trees.d.ts type definition for Trees.js. I see all other modules in /tree folder has type definition except Trees.js. See link to folder in repo.

@ericvergnaud
Copy link
Contributor

ericvergnaud commented Oct 19, 2024 via email

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.

3 participants
@ericvergnaud @ZengLawrence and others