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

Error in typings using TSServer #19

Open
dbellavista opened this issue Jun 7, 2022 · 1 comment
Open

Error in typings using TSServer #19

dbellavista opened this issue Jun 7, 2022 · 1 comment

Comments

@dbellavista
Copy link

Hi, I'm using tsserver for typechecking on a nodejs project, and I get an error when importing the package
See the gist: https://gist.github.com/dbellavista/901a33f0f23b1159972965349a19fbd1

$ npx tsc -p ./jsconfig.json
test.js:3:9 - error TS2306: File '/asd/node_modules/any-date-parser/index.d.ts' is not a module.

3 require('any-date-parser');
          ~~~~~~~~~~~~~~~~~


Found 1 error in test.js:3
@arough007
Copy link

I think I have a similar problem while using Typescript with React:

Screenshot 2022-06-30 at 09 19 35

I still can use it via const parser = require("any-date-parser");, but then I have no typings.

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

2 participants