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
Subsequent variables declarations must have the same type #68379
Comments
Having the same issue and the build is failing in GitLab CI/CD via Docker. Here's a snippet of the build log
|
The bug was introduced in this commit (file ts4.8/crypto.d.ts) 75fea78 . |
same issue coming for me.. how to solve this? |
In my case, since I am using Nuke build, I added a new step which after creating a new angular project using But I would like to have a better and official solution 😅. |
Will be fixed in #68371 |
Temporary workaround for me, was to use resolutions on package.json to force downgrading to version 20.11.7 (the one that was resolved at last sucessful build for my app)
|
This worked for me Thank you |
20.11.6 worked for me same error on 20.11.7 |
Both the versions 20.11.7 and 20.11.6 versions did not work out for us "resolutions": { Error is Error: node_modules/@types/node/ts4.8/crypto.d.ts:4477:13 - error TS2403: Subsequent variable declarations must have the same type. Variable 'crypto' must be of type 'Crypto', but here has type 'Crypto'. 4477 var crypto: webcrypto.Crypto; node_modules/typescript/lib/lib.dom.d.ts:18084:13 |
@RamMohanSonte do this in your devDependencies: "devDependencies": { |
I just merged a PR which should fix this: #68371 In a half hour when the package is published, please test and let me know if it works. |
I solved it by adding |
@jakebailey thank you very much for the solution. It worked perfectly here. |
Hi,
I am facing an issue when trying to build an angular package. It seems that "crypto" variable is declared several times with different "Crypto" types. I have been digging a bit and it seems crypto is declared globally at @types/node/ts4.8/crypto.d.ts:4477:13 and also at typescript/lib/lib.dom.d.ts:18084:13 dropping this an error when trying to build.
DevOps pipeline message:
I am using Nuke build and my package is being generated from a TS client generated by NSwag.
DefinitelyTyped/types/node/ts4.8/crypto.d.ts
Line 4477 in f58f900
The text was updated successfully, but these errors were encountered: