https://github.com/andrewbrey/deno_npm_compat_drizzle-orm
Reproduction of issue with Deno npm-compat for `drizzle-orm`
https://github.com/andrewbrey/deno_npm_compat_drizzle-orm
Last synced: 4 months ago
JSON representation
Reproduction of issue with Deno npm-compat for `drizzle-orm`
- Host: GitHub
- URL: https://github.com/andrewbrey/deno_npm_compat_drizzle-orm
- Owner: andrewbrey
- Created: 2023-07-14T01:27:17.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-14T01:27:28.000Z (almost 2 years ago)
- Last Synced: 2025-01-17T13:51:17.919Z (5 months ago)
- Language: TypeScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reproduction of issue with Deno npm-compat for `drizzle-orm`
When attempting to use the `drizzle-orm` (https://orm.drizzle.team) tool called
`drizzle-kit` to generate sql schema migrations from TypeScript model
definitions **via npm-specifiers in Deno**, I encountered the following error:```
error: Uncaught TypeError: worker.unref is not a function
at (file:///home/andrew/.cache/deno/npm/registry.npmjs.org/esbuild/0.18.12/lib/main.js:2295:10)
```This repository contains a minimal setup needed to test out if `drizzle-orm`
works with Deno npm-specifier based compatibility. The main point of interest is
actually the `migrate` task defined in the `deno.jsonc`:```
// deno.jsonc{
"tasks": {
...
"migrate": "deno run -A npm:drizzle-kit generate:sqlite"
}
}
```in which we use npm-specifiers to invoke the `drizzle-kit` cli tool to generate
sql migration files. If this were working correctly (and didn't produce the
error above out of its `esbuild` dependency) I would expect the tool to
successfully generate files in the`./drizzle` directory, at which point running
`deno task dev` would work, though that part is not _necessarily_ the subject of
this issue report.