LionC / express-basic-auth

Plug & play basic auth middleware for express
325 stars 57 forks source link

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

Open Miniontoby opened 1 year ago

Miniontoby commented 1 year ago

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

$ npm run build
> mynpmproject@1.0.0 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?

LionC commented 9 months ago

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.

Miniontoby commented 9 months ago

What package to install for the express types?

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