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

[BUG] error TS2688: Cannot find type definition file for 'express'. #60

Open
Miniontoby opened this issue Jun 20, 2023 · 2 comments
Open
Labels

Comments

@Miniontoby
Copy link

Hi, I added this to my project and it gives me an error whilst building my TS file.

$ npm run build
> [email protected] build
> tsc

node_modules/express-basic-auth/express-basic-auth.d.ts:1:23 - error TS2688: Cannot find type definition file for 'express'.

1 /// <reference types="express" />
                        ~~~~~~~


Found 1 error in node_modules/express-basic-auth/express-basic-auth.d.ts:1

Can someone maybe help to come up with a solution or patch?

  • Miniontoby
@LionC
Copy link
Owner

LionC commented Sep 28, 2023

The current types depend on you having express types installed as well. The current type setup is generally in need of an overhaul, but that will only be solved with v2 as it will probably need to break some current behaviours.

@LionC LionC added the v2 label Sep 28, 2023
@Miniontoby
Copy link
Author

Miniontoby commented Sep 29, 2023

What package to install for the express types?

Cause when I install @types/express it gives me more errors about this package...

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

No branches or pull requests

2 participants