taiga-ui
taiga-ui copied to clipboard
🐞 - " not assignable to the same property in base type" error after upgrade version in @taiga-ui/core
Which @taiga-ui/* package(s) are the source of the bug?
core
Please provide a link to a minimal reproduction of the bug
No response
Is this issue blocking you?
Blocking
Description
Hello, I'm facing to a issue after upgrade package version
Error:
When I opened files, I saw this:
It's an example of the one of error reasons
Down the version. rebuilding, reinstalling are not working ways to solve the project. After all, removing all Taiga packages from project and installing at least one which is not using components with polymorpheus wasn't lead to a stable work of my app.
Could you please give any recommends and advice for fixing?
It blocks building and working with the whole application for me:(
Angular version
14.1.2
Taiga UI version
2.60.0
Which browsers have you used?
- [X] Chrome
- [X] Firefox
- [ ] Safari
- [ ] Edge
Which operating systems have you used?
- [ ] macOS
- [X] Windows
- [ ] Linux
- [ ] iOS
- [ ] Android
It looks like you have 2 versions of @tinkoff/ng-polymorpheus
in your app. Could you please try removing it from package.json
, if you have it there, then remove package-lock.json
and node_modules
and do a clean npm i
. It is installed with @taiga-ui/cdk
, you shouldn't have it explicitly in your package.json
.
@tinkoff/ng-polymorpheus
My trying to go by your suggested way wasn't fixed the problem, unfortunately :( The same error still shows while it's bulding What can the another reason of it?
Show me please
~/my-project $ npm ls @tinkoff/ng-polymorpheus
and could you create a minimal repro on github?
@tinkoff/ng-polymorpheus
could you create a minimal repro on github?
Having similar issue:
Error: node_modules/@taiga-ui/kit/components/push/push.service.d.ts:10:5 - error TS2416: Property 'open' in type 'TuiPushService' is not assignable to the same property in base type 'AbstractTuiDialogService<TuiPushOptions>'.
Type '(content: PolymorpheusContent<TuiBaseDialogContext<string> & TuiPushOptions>, options?: Partial<TuiPushOptions> | undefined) => Observable<...>' is not assignable to type '<G = void>(content: PolymorpheusContent<TuiBaseDialogContext<G> & TuiPushOptions>, options?: Partial<TuiPushOptions> | undefined) => Observable<...>'.
Types of parameters 'content' and 'content' are incompatible.
Type 'PolymorpheusContent<TuiBaseDialogContext<G> & TuiPushOptions>' is not assignable to type 'PolymorpheusContent<TuiBaseDialogContext<string> & TuiPushOptions>'.
Type 'TemplateRef<TuiBaseDialogContext<G> & TuiPushOptions>' is not assignable to type 'PolymorpheusContent<TuiBaseDialogContext<string> & TuiPushOptions>'.
Type 'TemplateRef<TuiBaseDialogContext<G> & TuiPushOptions>' is not assignable to type 'TemplateRef<TuiBaseDialogContext<string> & TuiPushOptions>'.
Type 'TuiBaseDialogContext<G> & TuiPushOptions' is not assignable to type 'TuiBaseDialogContext<string> & TuiPushOptions'.
Type 'TuiBaseDialogContext<G> & TuiPushOptions' is not assignable to type 'TuiBaseDialogContext<string>'.
Types of property 'completeWith' are incompatible.
Type '(value: G) => void' is not assignable to type '(value: string) => void'.
Types of parameters 'value' and 'value' are incompatible.
Type 'string' is not assignable to type 'G'.
'G' could be instantiated with an arbitrary type which could be unrelated to 'string'.
open(content: PolymorpheusContent<TuiBaseDialogContext<string> & TuiPushOptions>, options?: Partial<TuiPushOptions>): Observable<string>;
I'm on 2.54.0
and 14.0.6
@rchks I think you can temporarily fix this by adding skipLibCheck
to your tsconfig. We are going to need a reproduction to fix this though. With latest 2.x version of 3.x.
Might be a problem with an old TypeScript version on the user side. Type definition generated with newer TS version might be incompatible with an older lib user TS version.
I am closing this as no reproduction was provided and in my practice this issue always comes from 2 different versions of @tinkoff/ng-polymorpheus
in your node_modules
.
Steps to fix, if anybody stumbles upon this are:
- Make sure you don't have
@tinkoff/ng-polymorpheus
in yourpackage.json
. - Update all Taiga UI packages to the latest same version.
- Remove
node_modules
andpackage-lock.json
. - Make clean
npm i
.
If you do that and still see this issue, please create a Github repositor to reproduce the issue and let us know.