If you know how to fix the issue, make a pull request instead.
If you do not mention the authors the issue will be ignored.
Environment:
package.json
- "express": "^4.17.1"
- "@types/express": "^4.17.2"
- "typescript": "^3.7.3"
Action to reproduce the error:
Error encountered:
node_modules/@types/express/index.d.ts(90,50): error TS2694: Namespace '"C:/Users/ttoussaint/path/to/my/project/node_modules/@types/express-serve-static-core/index"' has no exported member 'Params'.
node_modules/@types/express/index.d.ts(90,64): error TS2694: Namespace '"C:/Users/ttoussaint/path/to/my/project/node_modules/@types/express-serve-static-core/index"' has no exported member 'ParamsDictionary'.
node_modules/@types/express/index.d.ts(90,90): error TS2315: Type 'ErrorRequestHandler' is not generic.
node_modules/@types/express/index.d.ts(99,38): error TS2694: Namespace '"C:/Users/ttoussaint/path/to/my/project/node_modules/@types/express-serve-static-core/index"' has no exported member 'Params'.
node_modules/@types/express/index.d.ts(99,52): error TS2694: Namespace '"C:/Users/ttoussaint/path/to/my/project/node_modules/@types/express-serve-static-core/index"' has no exported member 'ParamsDictionary'.
node_modules/@types/express/index.d.ts(99,78): error TS2315: Type 'Request' is not generic.
node_modules/@types/express/index.d.ts(100,45): error TS2694: Namespace '"C:/Users/ttoussaint/path/to/my/project/node_modules/@types/express-serve-static-core/index"' has no exported member 'Params'.
node_modules/@types/express/index.d.ts(100,59): error TS2694: Namespace '"C:/Users/ttoussaint/path/to/my/project/node_modules/@types/express-serve-static-core/index"' has no exported member 'ParamsDictionary'.
node_modules/@types/express/index.d.ts(100,85): error TS2315: Type 'RequestHandler' is not generic.
What I tried that DID NOT work:
rm -rf node_modules + npm i
What I tried that DID work:
In my package-lock.json, I could see the following:
"@types/express-serve-static-core": {
"version": "4.16.2",
...
},
I added @types/express-serve-static-core@latest to my project's dependencies:
package.json
"@types/express-serve-static-core": "^4.17.0"
So now the package-lock.json looks like so:
"@types/express-serve-static-core": {
"version": "4.17.0",
...
},
I cannot make a PR since the package.json file is not in this repository. This is still an issue, since @types/express-serve-static-core should not appear amongst my dependencies.
If you know how to fix the issue, make a pull request instead.
@types/expresspackage and had problems.Definitions by:inindex.d.ts) so they can respond.If you do not mention the authors the issue will be ignored.
Environment:
package.jsonAction to reproduce the error:
Error encountered:
What I tried that DID NOT work:
rm -rf node_modules+npm iWhat I tried that DID work:
In my
package-lock.json, I could see the following:I added
@types/express-serve-static-core@latestto my project's dependencies:package.jsonSo now the
package-lock.jsonlooks like so:I cannot make a PR since the
package.jsonfile is not in this repository. This is still an issue, since@types/express-serve-static-coreshould not appear amongst my dependencies.