Open xanderjakeq opened 1 year ago
Hey @xanderjakeq are you trying to import a node module, or is it one of your package dependencies that is importing a node-specific dependency? If so, you may need to patch it to import using the node:
specifier for Deno compatibility.
I don't know.. i think it's my dependencies. This is happening in the build files, so am I editing them directly?
I've got a bunch of these on a project I'm trying this out with as well. For assert
, fs
, buffer
etc.
I suppose this adapter only checks the direct dependencies, and not deps of deps?
This is pretty much where we are at in #38
It does seem to be related, and maybe related to some difference in bundling the built-in node:
modules between rollup and esbuild. @drewbitt, @oskarhane, @xanderjakeq could you maybe provide a minimal reproduction just to help with the debugging and to understand if the root cause is the same for your issues?
have a simmilar issue
TypeError: Relative import path "dns" not prefixed with / or ./ or ../
If you want to use a built-in Node module, add a "node:" prefix (ex. "node:dns").
code is pretty simple just a +server.ts with
export async function GET(request: RequestEvent) {
const nameParam = request.url.searchParams.get('name');
if (!nameParam || nameParam === '_') {
return defaultResponse();
}
// do stuff and send response
...
}
deno 1.39.1 (release, x86_64-pc-windows-msvc)
v8 12.0.267.8
typescript 5.3.3
"svelte": "^4.2.7",
"svelte-adapter-deno": "^0.9.0",
"@sveltejs/kit": "^2.0.0",
I tried adding node:dns
but same issue
@leo-lox according to https://github.com/dbushell/sveltekit-adapter-deno/issues/5#issuecomment-1785922436, this project will likely not receive any updates any time soon and the other adapter is a bit more up to date with fixes.
thx, I did not see that
I get this error after building with svelte-adapter-deno. Not sure what I did wrong.