question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typescript problem with types in exchange-multipart-fetch

See original GitHub issue

Using

"urql": "1.10.0"
"@urql/exchange-multipart-fetch": "0.1.8"

and typescript 4.0.2 there is a compile time error when adding the multipartFetchExchange in the exchanges on `createClient’:

Type 'import(/node_modules/@urql/core/dist/types/types").Exchange' is not assignable to type 'import(/node_modules/urql/node_modules/@urql/core/dist/types/types").Exchange'.
Types of parameters 'input' and 'input' are incompatible.

Type 'import(/node_modules/urql/node_modules/@urql/core/dist/types/types").ExchangeInput' is not assignable to type 'import(/node_modules/@urql/core/dist/types/types").ExchangeInput'.
Types of property 'client' are incompatible.

Type 'import(/node_modules/urql/node_modules/@urql/core/dist/types/client").Client' is not assignable to type 'import(/node_modules/@urql/core/dist/types/client").Client'.
Types have separate declarations of a private property 'createOperationContext'.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
JoviDeCroockcommented, Sep 1, 2020

Could you try running yarn why @urql/core or list out your @urql/core versions with npm. This would imply that you have a duplicate equivalent of @urql/core floating around. The one in urql doesn’t seem deduplicated judging from the error.

You could try running yarn-deduplicate

1reaction
Corjencommented, Oct 6, 2020

Hi! Can confirm this is still an issue in a yarn workspace environment. Adding "workspaces": { "nohoist": [ "@urql/**" ] }, to packages/a/package.json fixed it for now 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

multipartFetchExchange error typescript #1458 - GitHub
"@urql/exchange-multipart-fetch": "^0.1.11",. And now it return this type error: /path/src/start/urql/getURQLClient.ts TypeScript error in ...
Read more >
TS errors while importing modules in files of shared directory
I have a problem with using npm @types typings in shared ... I use Webpack 2.2.0 with ts-loader (but tried awesome-typescript-loader ) as ......
Read more >
Documentation - TypeScript 4.9
The new satisfies operator lets us validate that the type of an expression matches some type, ... error! Property 'name' does not exist...
Read more >
Troubleshooting Handbook: Types
Have you read the TypeScript FAQ Your answer might be there! ... Union types are handy for solving some of these typing problems:...
Read more >
What's the problem with TypeScript's classes? - Medium
Values, Types, and the counter-intuitive behavior of classes. TypeScript's classes. If you wonder why this code compiles: class User { constructor(public ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found