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

Drizzle Integration with Bun: async_hooks.createHook not supported and Missing Configuration File Error #394

Open
Arunpaneru opened this issue May 10, 2024 · 0 comments

Comments

@Arunpaneru
Copy link

This issue reports two problems encountered when attempting to integrate Drizzle (versions drizzle-kit v0.20.18 and drizzle-orm v0.30.10) with the Bun JavaScript runtime:

Bun Hook Warning:

Bun generates a warning message stating async_hooks.createHook is not implemented in Bun. This indicates that Drizzle might be relying on the async_hooks module for asynchronous I/O monitoring, which Bun doesn't currently support.
Missing Configuration File: Drizzle fails to find the default configuration file drizzle.config.json. The error message "Failed to find Response internal state key" might be related to this.
Expected Behavior:

Drizzle should run seamlessly within the Bun environment without warnings or errors.
If Drizzle cannot leverage async_hooks in Bun, it should fall back on alternative methods or provide a way to disable this functionality.
The default configuration file drizzle.config.json should be located and used as expected.
Additional Information:

Bun Version: (Please specify the Bun version you're using)
Drizzle Usage: (Briefly describe how you're using Drizzle in your Bun project)
Steps to Reproduce:

Create a Bun project (if applicable).

Install Drizzle dependencies using bun install drizzle-kit drizzle-orm.
Attempt to run your Drizzle application using Bun's script runner (e.g., bun run generate).
Possible Solutions (to be explored):

Investigate Drizzle's compatibility with Bun.

Explore alternative approaches for asynchronous I/O monitoring in Bun.
Create the missing drizzle.config.json file (if necessary).
Consider using Drizzle in a Node.js environment if Bun compatibility is a challenge.
We appreciate any insights or suggestions the community might have to resolve this issue and improve Drizzle's integration with Bun.

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

1 participant