Mr.Possumz
Mr.Possumz
DDeno
Created by vaquilina on 5/25/2025 in #help
Deno not recognizing default export from npm package 'unstorage' as a function
It's not great but you could potentially resolve it as such:
import { createStorage } from 'unstorage';
import denoKVdriver from 'unstorage/drivers/deno-kv';
import type denoKvTypes from 'unstorage/drivers/deno-kv';

const driver = denoKVdriver as unknown as typeof denoKvTypes.default;

export const storage = createStorage({
driver: driver({}),
});
import { createStorage } from 'unstorage';
import denoKVdriver from 'unstorage/drivers/deno-kv';
import type denoKvTypes from 'unstorage/drivers/deno-kv';

const driver = denoKVdriver as unknown as typeof denoKvTypes.default;

export const storage = createStorage({
driver: driver({}),
});
7 replies
DDeno
Created by vaquilina on 5/25/2025 in #help
Deno not recognizing default export from npm package 'unstorage' as a function
y'know ironically, I don't think their package is really configured to be consumed in Deno. It's structured for Node.js
7 replies
DDeno
Created by vaquilina on 5/25/2025 in #help
Deno not recognizing default export from npm package 'unstorage' as a function
It looks like their driver directory doesn't have a general entry file for types and their package.json exports is set up in a way that it may not be able to automatically find it. Try adding a triple slash reference to the top of the file /// <reference types="unstorage/drivers/deno-kv.d.ts"/>
7 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
crazy question. Your deno vs code extension is up to date as well?
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
lol
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
it's resolving 8.16 for pg and 8.15.2 for types
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
shouldn't be. I'm using the same locally and have no issue
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
whatcha got?
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
strange, yeah your vscode just isnt recognizing the types for some reason. Not sure what would cause that
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
what version of deno are you using?
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
I'd imagine restarting vscode does restart the lsp but just in case let's try. You can use cmd+shift+p to bring up vscode commands. If you're on windows it's ctrl+shift+p I believe. Then type in Deno restart and it show show an option to restart to lsp
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
can you also post your deno.json imports section?
31 replies
DDeno
Created by lumio on 5/24/2025 in #help
NPM package "pg@8.16.0" does not define an export ".".
Have you tried restarting the deno lsp since adding the imports?
31 replies
DDeno
Created by iso on 3/15/2025 in #help
Deno env vars
@Igal My apologies. I did not realize that Kysely-ctl supported Deno. I'll have to see if I can get it running in my own projects again!
10 replies
DDeno
Created by iso on 3/15/2025 in #help
Deno env vars
To be fair, I saw someone mention that deno run and deno task can be used interchangeably to run tasks now. If that's true it's new to me! It used to be use had to call deno task specifically
10 replies
DDeno
Created by hob on 3/15/2025 in #help
high memory usage using compiled binary in docker
From what I've seen, Deno version 2 and up has a higher start up memory cost when run in Docker. I've seen similar numbers to what you're describing. They have eventually dropped a bit but the baseline is still several hundred mb higher than prior to Deno v2.0.0
15 replies
DDeno
Created by iso on 3/15/2025 in #help
Deno env vars
are you calling deno run or deno task to run the task from the deno file? If you're using the kysely CLI then it most likely expects to run in a node environment and you'd need to access to env variables as if you were in one for the sake of the migration. Alternatively, I was able to get Kysely migrations to work in Deno by just writing a migrator defined in their docs here: https://kysely.dev/docs/migrations#running-migrations
10 replies
DDeno
Created by TheOneThatPlaysTooMuch on 3/8/2025 in #help
Cookie issues
can you provide a screenshot of the browser's network call response headers to show us what the cookie on the response looks like and what header it's passed under?
4 replies
DDeno
Created by Martin Carlsson on 3/1/2025 in #help
Deno, React, Next.js
Just to add to this, Fresh 2.0 is actively in dev and has had a few iterations of their alpha branch available: https://jsr.io/@fresh/core/versions The release has been delayed because the Deno team is focusing on some upgrades to the Deno Deploy product that will pave the way for a few additional features they are aiming to include in Fresh 2.0
7 replies
DDeno
Created by HudsyWudsy on 2/25/2025 in #help
Build an app with TanStack and Deno
@HudsyWudsy have you scaffolded the app directory as a Deno project? Typically that's done by calling deno init <DIRECTORY> . That should ask you a few questions and scaffold a basic Deno project, including adding a deno.json file. Once there's a deno.json file you should be able to call deno add jsr:@hono/hono
5 replies