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

typescript error TS1005: ',' expected. #748

Closed
ldr-dev opened this issue Nov 11, 2022 · 8 comments
Closed

typescript error TS1005: ',' expected. #748

ldr-dev opened this issue Nov 11, 2022 · 8 comments
Labels
question Further information is requested

Comments

@ldr-dev
Copy link

ldr-dev commented Nov 11, 2022

Hello, first of all thank you for this package. I'm having a problem with it. When I run yarn tsc --noEmit

node_modules/htmlparser2/lib/index.d.ts:2:23 - error TS1005: ',' expected.

2 export { Parser, type ParserOptions };
                         ~~~~~~~~~~~~~

node_modules/htmlparser2/lib/index.d.ts:4:27 - error TS1005: ',' expected.

4 export { DomHandler, type DomHandlerOptions };
                             ~~~~~~~~~~~~~~~~~

node_modules/htmlparser2/lib/index.d.ts:32:37 - error TS1005: ',' expected.

32 export { default as Tokenizer, type Callbacks as TokenizerCallbacks, } from "./Tokenizer.js";
                                        ~~~~~~~~~

it gives these errors. How can he solve this? Thanks.

@remarkablemark remarkablemark added the question Further information is requested label Nov 11, 2022
@remarkablemark
Copy link
Owner

Can you update your tsconfig.json to exclude node_modules?

@ldr-dev
Copy link
Author

ldr-dev commented Nov 11, 2022

I'm already doing this. But it doesn't work.
"exclude": ["node_modules/**"],
There is no such problem before version 2.0.0 of this package, but after 2.0.0 this problem is experienced.

@remarkablemark
Copy link
Owner

You'll have to upgrade TypeScript. See:

@ldr-dev
Copy link
Author

ldr-dev commented Nov 11, 2022

Is it a problem to use version 2.0.0?

@remarkablemark
Copy link
Owner

There is no problem but all new updates will be on the latest version

@ldr-dev
Copy link
Author

ldr-dev commented Nov 11, 2022

Thank you very much for your answers. I can't update the typescript version for now. When I update the Typescript package, I will use the latest version of this package.

@ldr-dev ldr-dev closed this as completed Nov 11, 2022
remarkablemark added a commit that referenced this issue Nov 13, 2022
@SalahAdDin
Copy link

Thank you very much for your answers. I can't update the typescript version for now. When I update the Typescript package, I will use the latest version of this package.

what was your solution then?

@remarkablemark
Copy link
Owner

@SalahAdDin I believe the person who opened the issue decided to use html-react-parser v2 instead of upgrading to the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants