Open
Description
Describe the bug
When trying to use the client library on Deno Deploy, there is the following error:
TypeError: Deno.permissions.querySync is not a function
at getEnv (https://deno.land/x/[email protected]/_src/adapter.shared.deno.ts:3:36)
at parseConnectDsnAndArgs (https://deno.land/x/[email protected]/_src/conUtils.ts:504:21)
at ClientPool._parseConnectArguments (https://deno.land/x/[email protected]/_src/conUtils.ts:99:17)
at ClientPool._getNormalizedConnectConfig (https://deno.land/x/[email protected]/_src/baseClient.ts:364:46)
at ClientPool.getNewConnection (https://deno.land/x/[email protected]/_src/baseClient.ts:375:31)
at ClientConnectionHolder._getConnection (https://deno.land/x/[email protected]/_src/baseClient.ts:62:43)
at ClientConnectionHolder.retryingFetch (https://deno.land/x/[email protected]/_src/baseClient.ts:175:31)
at ClientConnectionHolder.query (https://deno.land/x/[email protected]/_src/baseClient.ts:219:17)
at Client.query (https://deno.land/x/[email protected]/_src/baseClient.ts:594:27)
at async file:///src/main.ts:5:16
Reproduction
Include the code that is causing the error:
import { createClient } from "https://deno.land/x/edgedb/mod.ts";
const client = createClient();
const result = await client.query("select 2 + 2");
console.log(result);
Deno.serve((req: Request) => new Response("It works!"));
Expected behavior
Being able to use the client library on Deno Deploy.
Additional context
Sentry had a similar issue with Deno Deploy which was fixed here.
It is possible to workaround the issue on Deno Deploy with this hack, but it would be much better if resolved on the library.