Skip to content
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

Typescript check not passing after Deno 1.13.2 #303

Closed
jintaokoong opened this issue Oct 24, 2021 · 12 comments · Fixed by #307
Closed

Typescript check not passing after Deno 1.13.2 #303

jintaokoong opened this issue Oct 24, 2021 · 12 comments · Fixed by #307

Comments

@jintaokoong
Copy link

Environment

OS: Linux 5.10.70-1-MANJARO
Deno version: deno 1.14.0
V8 version: v8 9.4.146.15
TS version: typescript 4.4.2

Issue

Importing denodb causes TS check to not pass after deno 1.13.2.

code

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

outputs

error: TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:100:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
        // @ts-expect-error
        ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:105:9

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:116:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:200:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
    // @ts-expect-error
    ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:225:5

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
        // @ts-expect-error
        ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:391:9

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
      // @ts-expect-error
      ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:424:7

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
          // @ts-expect-error
          ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:446:11

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
          // @ts-expect-error
          ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:451:11

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
    // @ts-expect-error
    ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:646:5

TS2578 [ERROR]: Unused '@ts-expect-error' directive.
    // @ts-expect-error
    ~~~~~~~~~~~~~~~~~~~
    at https://deno.land/[email protected]/node/events.ts:667:5

Found 11 errors.

I suppose this is caused by one of the dependencies that depends on the std library, maybe bumping the offending dependency would resolve this issue?

@jintaokoong jintaokoong changed the title Typescript check not passing after Deno 1.14.0 Typescript check not passing after Deno 1.13.2 Oct 25, 2021
@CristianRoibu
Copy link

deno 1.15.1, same issue

@seanmavley
Copy link

I can't seem to use it, because this error keeps coming up. Is the only workaround to downgrade to a version earlier than the above?

@kinghat
Copy link

kinghat commented Nov 9, 2021

now also in 1.16.0 we get:

error: TS2339 [ERROR]: Property 'getIterator' does not exist on type 'ReadableStream'.
return res.readable.getIterator();

i think its in the mongo module:

│ ├─┬ https://deno.land/x/[email protected]/mod.ts (1002B)
│ │ ├─┬ https://deno.land/x/[email protected]/lib/connectors/connector.ts (1.25KB)
│ │ │ ├─┬ https://deno.land/x/[email protected]/lib/query-builder.ts (5.54KB)
│ │ │ │ ├─┬ https://deno.land/x/[email protected]/deps.ts (1.35KB)
│ │ │ │ │ ├─┬ https://deno.land/x/[email protected]/mod.ts (113B)
│ │ │ │ │ │ ├─┬ https://deno.land/x/[email protected]/deps.ts (783B)
│ │ │ │ │ │ │ ├─┬ https://deno.land/[email protected]/node/_crypto/pbkdf2.ts (4.18KB)
│ │ │ │ │ │ │ │ ├── https://deno.land/[email protected]/hash/mod.ts *
│ │ │ │ │ │ │ │ ├─┬ https://deno.land/[email protected]/node/buffer.ts (15.46KB)
│ │ │ │ │ │ │ │ │ ├── https://deno.land/[email protected]/encoding/base64.ts *
│ │ │ │ │ │ │ │ │ ├── https://deno.land/[email protected]/encoding/hex.ts *
│ │ │ │ │ │ │ │ │ └─┬ https://deno.land/[email protected]/node/_utils.ts (5.74KB)
│ │ │ │ │ │ │ │ │   ├─┬ https://deno.land/[email protected]/async/mod.ts (202B)
│ │ │ │ │ │ │ │ │   │ ├── https://deno.land/[email protected]/async/deferred.ts *
│ │ │ │ │ │ │ │ │   │ ├── https://deno.land/[email protected]/async/delay.ts (279B)
│ │ │ │ │ │ │ │ │   │ ├─┬ https://deno.land/[email protected]/async/mux_async_iterator.ts (1.96KB)
│ │ │ │ │ │ │ │ │   │ │ └── https://deno.land/[email protected]/async/deferred.ts *
│ │ │ │ │ │ │ │ │   │ └── https://deno.land/[email protected]/async/pool.ts (1.58KB)

@kinghat
Copy link

kinghat commented Nov 9, 2021

I can't seem to use it, because this error keeps coming up. Is the only workaround to downgrade to a version earlier than the above?

you could use an import map like this:

{
  "imports": {
    "https://deno.land/[email protected]/node/events.ts": "https://deno.land/[email protected]/node/events.ts",
    "https://deno.land/[email protected]/async/pool.ts": "https://deno.land/[email protected]/async/pool.ts"
  }
}

@lejacobroy
Copy link

I think I narowed-down the issue.
It comes from the 'dex' dependency, pointing at the master branch.
export { default as SQLQueryBuilder } from "https://raw.githubusercontent.com/aghussb/dex/master/mod.ts";

Could we point to a previous fixed release instead?

@SammyShehter
Copy link

deno 1.16.1 Same issue

@haze5959
Copy link

update please
help

@Zhomart
Copy link

Zhomart commented Nov 19, 2021

Still happening.

deno 1.16.2 (release, x86_64-apple-darwin)
v8 9.7.106.2
typescript 4.4.2

Code:

import {
    Database,
    DataTypes,
    Model,
    SQLite3Connector,
} from 'https://deno.land/x/[email protected]/mod.ts';

import map didn't help for me unfortunately. What other people are doing?

thread 'main' panicked at 'internal error: entered unreachable code: unexpected missing emit: https://deno.land/x/[email protected]/src/collection/commands/aggregate.ts', cli/proc_state.rs:544:15
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Update: I decided to use raw sqlite package

@demarche1
Copy link

deno 1.16.2 Same problem.
I managed to use it using version 1.15.3

@Zhomart
Copy link

Zhomart commented Nov 21, 2021

This pull #307 solves the compatibility issues with the latest deno (v.1.16.2).

The problem was with the dex library as @lejacobroy pointed out above, postgres lib, mysql, mongodb and sqlite dependencies.

I haven't tested the PR on serious projects.

@d-513
Copy link

d-513 commented Dec 6, 2021

Until #307 gets merged, a workaround is importing the PR directly:

import { Database } from "https://raw.githubusercontent.com/Zhomart/denodb/update-deps/mod.ts";

@eveningkid
Copy link
Owner

This should be fixed with #307!

Please upgrade to master or 1.0.40.

Have a great day :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet