@types/express-serve-static-core/index.d.ts causing build errors
Asked Answered
D

1

7

Started encountering this issue after pushing changes which has nothing to do with the node_modules or the deployment pipeline. This issue is also seen when trying to rerun an already successful deployment in bitbucket.

enter image description here

I even tried updating the some of the packages to the latest version, but it still throws the same error.

But locally in my pc I have no issue with npm run build.

When the bitbucket pipeline is run.

  • The docker first installs node_modules using the npm install cmd.

  • After this while running npm run build the pipeline is failing with the error shown in the image above.

So I suspect it is the packages in the node_modules that are newly getting downloaded, because locally I have no problem with the build cmd.

Could anyone help me out, whether it is the incompatibility between the npm packages or the pipeline itself, Or if there might be any other error.

Thank you

Demolish answered 15/9, 2022 at 9:2 Comment(3)
Try updating your typescript version > 4.1 Find the similar issue on GitHub : github.com/DefinitelyTyped/DefinitelyTyped/issues/62264Como
Thank you @NitheesramRajes changing version fixed the issue.Demolish
Thank you @NitheesramRajes. I really hate TypeScript sometimes.Septic
V
8

Thanks to @Nitheesram Rajes I was able to fix this issue by updating typescript package using the command

npm install --save-dev typescript@latest
Verecund answered 21/11, 2022 at 22:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.