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

Using D1Dialect causes worker tests to fail - Cannot use require() to import an ES Module. #27

Open
Suman085 opened this issue May 28, 2024 · 2 comments

Comments

@Suman085
Copy link

Initializing D1Dialect causes my tests to not run as expected.

	private async initializeDb(db: D1Database) {
		this.db = new Kysely<Database>({
			dialect: new D1Dialect({ database: db }),
		});
	}

image

Happy to help...

@NoxHarmonium
Copy link

I just ran into this issue using vitest. This is due to lack of an ESM module in the published NPM package.
It is fixed in #25 but hasn't been published to NPM yet. I've published a temporary fork to unblock what I was working on at "@noxharmonium/[email protected]" if anyone want's to use that in the meantime.

@aidenwallis Let me know if you need any help with getting a new release out. If it is blocked due to some outstanding bugs I could try and have a look.

@matthewlynch
Copy link

Thanks for publishing the fork @NoxHarmonium

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

No branches or pull requests

3 participants