We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug After we updated supabase project and deployed our edge function we have got this error
event loop error: TypeError: Deno.stat is not a function at Connection.#openSocketConnection (https://deno.land/x/postgres@v0.17.0/connection/connection.ts:172:35) at Connection.#startup (https://deno.land/x/postgres@v0.17.0/connection/connection.ts:222:45) at Connection.startup (https://deno.land/x/postgres@v0.17.0/connection/connection.ts:360:40) at PoolClient.connect (https://deno.land/x/postgres@v0.17.0/client.ts:161:36) at https://deno.land/x/postgres@v0.17.0/pool.ts:165:30 at Function.from () at Pool.#initialize (https://deno.land/x/postgres@v0.17.0/pool.ts:160:31) at new Pool (https://deno.land/x/postgres@v0.17.0/pool.ts:87:39)
this is code that we are using
import { Pool } from "postgres"; import { serve } from "server"; const pool = new Pool( { tls: { enabled: false }, database: "postgres", hostname: Deno.env.get('DB_HOST'), user: "postgres", port: 5432, password: Deno.env.get('DB_PASSWORD'), }, 1 );
and these are import maps:
{ "imports": { "server": "https://deno.land/std@0.199.0/http/server.ts", "postgres": "https://deno.land/x/postgres@v0.17.0/mod.ts" } }
Please help :D
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
Moving this to edge runtime repo since it seems to affect hosted project.
After i removed DB_HOST and set real db host string, and after i've done for all 4 env variables. My function start to work correctly...
But again, i don't like to have hardcoded things in function. For some reason it could not read en vars
This appears to be because the postgres package was trying to refer Deno.stat.
postgres
Deno.stat
In the edge runtime, this API is disabled due to security issues with the file system.
Closing this issue for housekeeping.
No branches or pull requests
Describe the bug
After we updated supabase project and deployed our edge function we have got this error
event loop error: TypeError: Deno.stat is not a function
at Connection.#openSocketConnection (https://deno.land/x/postgres@v0.17.0/connection/connection.ts:172:35)
at Connection.#startup (https://deno.land/x/postgres@v0.17.0/connection/connection.ts:222:45)
at Connection.startup (https://deno.land/x/postgres@v0.17.0/connection/connection.ts:360:40)
at PoolClient.connect (https://deno.land/x/postgres@v0.17.0/client.ts:161:36)
at https://deno.land/x/postgres@v0.17.0/pool.ts:165:30
at Function.from ()
at Pool.#initialize (https://deno.land/x/postgres@v0.17.0/pool.ts:160:31)
at new Pool (https://deno.land/x/postgres@v0.17.0/pool.ts:87:39)
this is code that we are using
and these are import maps:
Please help :D
The text was updated successfully, but these errors were encountered: