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.

Deno 1.9.2 error: TS2315 [ERROR]: Type 'Conn' is not generic. at https://deno.land/x/postgres@v0.11.1/connection/connection.ts:149:11

See original GitHub issue

hi. I’m trying to import the library with this code

import { DataTypes, Database, Model } from 'https://deno.land/x/denodb@v1.0.35/mod.ts';

and I got this error

Check file:///home/valianmasdani/codes/deno/denodblike/main.ts
error: TS2315 [ERROR]: Type 'Conn' is not generic.
  #conn!: Deno.Conn<Deno.NetAddr>;
          ~~~~~~~~~~~~~~~~~~~~~~~
    at https://deno.land/x/postgres@v0.11.1/connection/connection.ts:149:11

With Deno version:

deno 1.9.2 (release, x86_64-unknown-linux-gnu)
v8 9.1.269.5
typescript 4.2.2

DenoDB v1.0.33 works fine though. Are there any news about incompatibility issues lately in the new deno version?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
eveningkidcommented, Apr 29, 2021

@OdilonDamasceno yes that is because deno.land picks up on every new github release, not on master I think 😃

I was waiting on @vmasdani to check if the issue was solved first, before creating a new release.

So it’s now out with 1.0.36, thank you for your help!

Have a great day

1reaction
vmasdanicommented, Apr 29, 2021

Hey Muhammad, Yes, this is a known issue and related to denodrivers/postgres#281. We’re still waiting on them to patch this issue. Another way out was apparently to downgrade the dependency but I think a fix will come soon enough. Let’s wait and see 😃

Ah if it’s from postgres we can’t really do much, I guess we’ll just wait

I’m using https://github.com/eveningkid/denodb/commit/9a19bdb22ec2791aa7921f23c6206759ac2e2d0d and it works fine now 😄

Screenshot from 2021-04-29 15-46-59 Screenshot from 2021-04-29 15-48-21

Read more comments on GitHub >

github_iconTop Results From Across the Web

Type 'Conn' is not generic - with Deno using oak as server ...
The error comes from incompatibility between deno earlier than 1.9 and oak later than v7. Since I installed deno a few hours ago...
Read more >
TS2315 [ERROR]: Type 'Conn' is not generic · Issue #300
Hi, this error comes on my macOs Big Sur machine with any oak-repo or even the hello world example. Any ideas? $ deno...
Read more >
Type 'ExecutionResult' is not generic
ts:19:134 - error TS2315: Type 'ExecutionResult' is not generic. 19 export interface FetchResult<TData = Record<string, any>, TContext = Record< ...
Read more >
Why does TS say the type is not generic when it in fact is?
Why does Webstorm tell me in one breath that the type is both generic and not generic? I'm confused about this error. TS...
Read more >
Typescript: error TS2315: Type 'Plugin' is not generic
Typescript: error TS2315: Type 'Plugin' is not generic. ... 10:38:16.682 | node_modules_dev/@nuxt/types/config/build.d.ts(125,58): error TS2315: Type ...
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