-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Excessive stack depth comparing types with TS 3.2 #29112
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
Comments
C:\dev\server\node_modules\ts-node\src\index.ts:261 |
I can confirm, that this issue still persists in This issue was introduced somehwere in 2.7.x - and has been moved from milestone to milestone to get fixed. Unfortunately, this has not been the case for now :( |
Same issue here with TypeORM. :( error TS2321: Excessive stack depth comparing types 'any' and 'FindConditions'. |
I think, the TypeORM related issue is the most common threat, why people end up in this issue here, haha ;) |
This issue is a deal breaker :-( |
Can you guys please check it in the |
EDIT: it works with Unfortunately @pleerock I get the same with 0.2.15-rc.1 (TS 3.3.3333, ts-node: 8.0.3):
Weirdly enough it works fine with just a |
The only way I could reproduce this issue is when I did |
FYI update: I hope I get this tested during Easter with latest TypeScript & ts-node and create a small reproduction repo :-) |
I confirm it works with For all the tests I was using |
Just got hit by this in TS 3.6.2 which Renovate bot just attempted to update to and our pipeline failed. ): It's not even our own code. It comes from one of the libraries that we use:
P.S.: Maybe related? #21592 |
After upgrading to TS 3.6.2 got this error from a dependency library Typeorm as well. Reverting back to [email protected] and the issue went away.
|
Downgrading to [email protected] resolved the issue for me as well. |
Im experiencing this in one of my projects. package.json had
|
I confirm that [email protected] solves this issue for TypeORM users (through NestJS). |
Like @michaelharrisonroth we've just downgraded to [email protected] to solve the issue. |
[Upstream issue](microsoft/TypeScript#29112)
Strange error. For me helped to change version of typescript.
It works vice versa with no matter what version is it(except 3.6.2) |
Same issue here 😎 |
Just had this issue occur for me while trying to build a typeorm project in AWS CodeBuild and locally in ubuntu 18.04: Versions: Console output: error TS2321: Excessive stack depth comparing types 'MongoRepository' and 'Repository'. controller.ts:170:33 - error TS2589: Type instantiation is excessively deep and possibly infinite. 170 status: MoreThanOrEqual(1) node_modules/typeorm/repository/MongoRepository.d.ts:12:22 - error TS2589: Type instantiation is excessively deep and possibly infinite. 12 export declare class MongoRepository extends Repository { node_modules/typeorm/repository/MongoRepository.d.ts:45:5 - error TS2321: Excessive stack depth comparing types '(optionsOrConditions?: string | number | Date | ObjectID | FindOneOptions | Partial, maybeOptions?: FindOneOptions) => Promise' and '{ (id?: string | number | Date | ObjectID, options?: FindOneOptions): Promise; (options?: FindOneOptions): Promise; (conditions?: FindConditions, options?: FindOneOptions<...>): Promise<...>; }'. 45 findOne(optionsOrConditions?: string | number | Date | ObjectID | FindOneOptions | Partial, maybeOptions?: FindOneOptions): Promise<Entity | undefined>; |
Chiming in with the same error for new version of typeorm. Node: v12.6.0 Downgrading typescript v.3.5.3 |
Same issue here, wondering what is the meaning of such an issue... |
same issue here with here error appears on export function getCookie(key: string) {
const matches = document.cookie.match(new RegExp(`(?:^|; )${key}=([^;]*)`));
if (matches) {
const [, match] = matches;
const cookieValue = decodeURIComponent(match);
return cookieValue;
}
return null;
} EDIT : fixed with export function getCookie(key: string) {
const matches = document.cookie.match(new RegExp(`(?:^|; )${key}=([^;]*)`));
if (matches) {
const [, match] = Array.from(matches);
const cookieValue = decodeURIComponent(match);
return cookieValue;
}
return null;
} |
no error if i change the type to |
Facing the same issue |
I am also facing this issue with Prisma when comparing two arraws with the types such as |
Same with a custom type I wrote coming from Nuxt type And appearing randomly. It's not always displayed as an error: Would be great to have a Btw I'm running |
TypeScript Version: 3.2.2
Search Terms:
error TS2321: Excessive stack depth comparing types
lodash
Code
Expected behavior:
This code should compile with TS 3.2 as it will with TS 3.1
Actual behavior:
Compliation fails with the following error
The text was updated successfully, but these errors were encountered: