oguimbal / pg-mem

An in memory postgres DB instance for your unit tests
MIT License
1.87k stars 94 forks source link

Deno: Uncaught ReferenceError: IMigrate is not defined #165

Open Satont opened 2 years ago

Satont commented 2 years ago

Describe the bug

warning: Cannot load module "https://deno.land/x/immutable@4.0.0-rc.12-deno.1/node_modules/immutable/dist/immutable-nonambient.d.ts".
    at https://deno.land/x/immutable@4.0.0-rc.12-deno.1/mod.ts:3:15
  If the source module contains only types, use `import type` and `export type` to import it instead.

error: Uncaught ReferenceError: IMigrate is not defined
import MigrationFile = IMigrate.MigrationFile

To Reproduce

mod.ts

import { newDb } from 'https://deno.land/x/pg_mem/mod.ts';

new (newDb().adapters.createPg().Client)

deno run mod.ts

pg-mem version

Deno: 1.15.1 pg-mem: 2.1.5

KnorpelSenf commented 2 years ago

Cannot reproduce. It's already not possible to import { newDb } from 'https://deno.land/x/pg_mem/mod.ts'; because the module does not compile.

# fails:
deno cache https://deno.land/x/pg_mem/mod.ts
Satont commented 2 years ago

Update on pg-mem 2.1.7

$ deno cache https://deno.land/x/pg_mem@2.1.7/mod.ts
error: TS2339 [ERROR]: Property 'default' does not exist on type 'Hash'.
export default code as any as typeof types.default;
                                           ~~~~~~~
    at https://deno.land/x/object_hash@2.0.3.1/mod.ts:4:44