Kevin Whinnery
Kevin Whinnery
DDeno
Created by jaydanurwin on 2/6/2024 in #help
Astro 4.0 Support
Very fair - I will take a fresh look this week. And FWIW the team also agrees, Node.js framework support is going to be a major theme for us this year.
22 replies
DDeno
Created by jaydanurwin on 2/6/2024 in #help
Astro 4.0 Support
I can take a look - I had reviewed one a while back that wasn’t fully working, but can take a look again for new ones
22 replies
DDeno
Created by jaydanurwin on 2/6/2024 in #help
Astro 4.0 Support
Apologies, the Astro adapter work has not progressed that far. I didn’t realize Node compat could support the Node adapter!
22 replies
DDeno
Created by Bairdy on 10/23/2023 in #help
Can you recommend a mysql driver for deno that isn't a complete dead end?
Hm, got it.
26 replies
DDeno
Created by Bairdy on 10/23/2023 in #help
Can you recommend a mysql driver for deno that isn't a complete dead end?
Yeah, I feel like now we are in the land of certificate handling, and Deno and Node have different mechanisms of handling SSL handshakes (if indeed Node is able to connect to your local DB)
26 replies
DDeno
Created by Bairdy on 10/23/2023 in #help
Can you recommend a mysql driver for deno that isn't a complete dead end?
So if I try to connect to a PlanetScale DB with the options you mention using mysql2 on npm, I should probably see what you are seeing
26 replies
DDeno
Created by Bairdy on 10/23/2023 in #help
Can you recommend a mysql driver for deno that isn't a complete dead end?
If the mysql2 npm module isn't working, that's definitely a compatibility issue we should jump on - @toninho do deno if you have a reproduction case we could use to validate, that would be awesome
26 replies
DDeno
Created by thorwebdev on 12/11/2023 in #help
How do I run an npm script with multiple dependencies, e.g. `drizzle-kit generate:pg`?
4 replies
DDeno
Created by thorwebdev on 12/11/2023 in #help
How do I run an npm script with multiple dependencies, e.g. `drizzle-kit generate:pg`?
It looks like we have a few issues at play here. The first is that drizzle-kit expects that drizzle-orm has already been installed to node_modules in the current folder (it doesn't work if you run npx drizzle-kit generate:pg without doing this either). My recommendation here is that (for now) you manage these dependencies with an npm client.
npm i drizzle-orm postgres
npm i -D drizzle-kit
npm i drizzle-orm postgres
npm i -D drizzle-kit
Once you do this, however, running
deno run -A npm:drizzle-kit generate:pg
deno run -A npm:drizzle-kit generate:pg
Still produces an error. This is an npm compatibility error that has been reported here: https://github.com/denoland/deno/issues/19826 - it would appear that we don't have the right shims in place for the worker thread API for core Node. To run the migration generation, you'd need to run this through Node today as well 😦
npx drizzle-kit generate:pg
npx drizzle-kit generate:pg
However, the actual client code works just fine in Deno:
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import { users } from "./schema.ts";

const connectionString = Deno.env.get("DATABASE_URL") || "";

const client = postgres(connectionString);
const db = drizzle(client);

const allUsers = await db.select().from(users);
console.log(allUsers);
import { drizzle } from "drizzle-orm/postgres-js";
import postgres from "postgres";
import { users } from "./schema.ts";

const connectionString = Deno.env.get("DATABASE_URL") || "";

const client = postgres(connectionString);
const db = drizzle(client);

const allUsers = await db.select().from(users);
console.log(allUsers);
4 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
issue report for error message: https://github.com/denoland/deno/issues/20763
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
Also, just for posterity and future explorers who might find this thread - it's definitely a good idea to use npm: specifiers rather than esm.sh - the former import path is actively developed and maintained by the core team
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
just did not in this example except for fp-ts
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
you can pin versions in import map too
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
import { either, option, task, taskEither } from "fp-ts";
import { flow, pipe } from "fp-ts/lib/function";
import FastQuerystring from "fast-querystring";
import * as Cookie from "cookie";
import * as Rx from "rxjs";
import { either, option, task, taskEither } from "fp-ts";
import { flow, pipe } from "fp-ts/lib/function";
import FastQuerystring from "fast-querystring";
import * as Cookie from "cookie";
import * as Rx from "rxjs";
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
"imports": {
"lume/": "https://deno.land/x/lume@v1.19.1/",
"deno/": "https://deno.land/std@0.202.0/",
"fp-ts": "npm:fp-ts@2.16.1",
"fp-ts/lib/function": "npm:fp-ts@2.16.1/lib/function",
"fast-querystring": "npm:fast-querystring",
"cookie": "npm:cookie",
"rxjs": "npm:rxjs",
"zod": "npm:zod",
"unocss": "npm:unocss"
},
"imports": {
"lume/": "https://deno.land/x/lume@v1.19.1/",
"deno/": "https://deno.land/std@0.202.0/",
"fp-ts": "npm:fp-ts@2.16.1",
"fp-ts/lib/function": "npm:fp-ts@2.16.1/lib/function",
"fast-querystring": "npm:fast-querystring",
"cookie": "npm:cookie",
"rxjs": "npm:rxjs",
"zod": "npm:zod",
"unocss": "npm:unocss"
},
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
No description
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
it should update when you run with an updated deno.json, but can also delete the lockfile to have it regenerate
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
I will continue to try and figure out why this isn't working, but the bad error message is definitely a bug on our side to address
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
I think the issue here is something in how esm.sh is processing these node modules
36 replies
DDeno
Created by yoggyd on 10/2/2023 in #help
deno doc: error: fp-ts
You can use npm specifiers in the import map for sure
36 replies