Barry
Barry
CDCloudflare Developers
Created by Barry on 8/1/2024 in #general-help
is it possible to use hyperdrive via cloudflare tunnel?
Got it, good to hear it's already on the roadmap. I'll have to keep it public for now then 😦
4 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
Well.. managed to get the hyperdrive config created, but no way to bind it to a pages app, should have seen that coming by now
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
Okay it deployed successfully, giving an error because I have not configured the connection string environment variable yet... so let's try that
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
ah i got passed that by removing node_modules and re-installing.
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
does wrangler have any cache location?
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
I'm getting
Project not found. The specified project name does not match any of your existing projects. [code:
8000007]
Project not found. The specified project name does not match any of your existing projects. [code:
8000007]
instead of it asking what project to deploy to, I re-made the project a few times to test the compat modes, it's stuck on the old project name for some reason even though I have not hardcoded that anywhere
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
It's giving issues but I don't think it will work regardless, I think hyperdrive relies on the node_compat to use the tcp socket api
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
Thanks for your answer though, sorry for the rant.
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
How can cloudflare be promoting these features like HYPERDRIVE and have it only available for workers and not pages. Is it really so different? All these resources to get started on pages with so many frameworks and in the end they are useless because you don't get feature parity with plain workers. It is extremely frustrating trying to work with cloudflare...
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
Well I tried adding nodejs_compat to compatibility flags in the cloudflare console, but trying to deploy again results in the same error.
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
I found an old blog post https://blog.cloudflare.com/workers-tcp-socket-api-connect-databases/ about the tcp socket api that mentions you need to enable node_compat in the worker. but I can not create a wrangler.toml for pages, how am I supposed to enable node_compat for a pages app?
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
I don't understand how in the cloudflare docs https://developers.cloudflare.com/workers/tutorials/postgres/ they just do import { Client } from "pg"; but don't explain how that handles the package's build-in node dependencies
19 replies
CDCloudflare Developers
Created by Barry on 10/2/2023 in #pages-help
postgres orm drizzle setup can not be bundled by rollup
I tried to override the build config with
build:{
rollupOptions:{
external:['os','fs','stream','net','tls','crypto']
}
},
build:{
rollupOptions:{
external:['os','fs','stream','net','tls','crypto']
}
},
which allows it to build, but that results in
✘ [ERROR] Build failed with 6 errors:

../server/assets/@qwik-city-plan-ad59c24d.js:1:186: ERROR: Could not resolve "os"
../server/assets/@qwik-city-plan-ad59c24d.js:1:205: ERROR: Could not resolve "fs"
../server/assets/@qwik-city-plan-ad59c24d.js:1:224: ERROR: Could not resolve "net"
../server/assets/@qwik-city-plan-ad59c24d.js:1:244: ERROR: Could not resolve "tls"
../server/assets/@qwik-city-plan-ad59c24d.js:1:264: ERROR: Could not resolve "crypto"
✘ [ERROR] Build failed with 6 errors:

../server/assets/@qwik-city-plan-ad59c24d.js:1:186: ERROR: Could not resolve "os"
../server/assets/@qwik-city-plan-ad59c24d.js:1:205: ERROR: Could not resolve "fs"
../server/assets/@qwik-city-plan-ad59c24d.js:1:224: ERROR: Could not resolve "net"
../server/assets/@qwik-city-plan-ad59c24d.js:1:244: ERROR: Could not resolve "tls"
../server/assets/@qwik-city-plan-ad59c24d.js:1:264: ERROR: Could not resolve "crypto"
when running pages:deploy
19 replies
CDCloudflare Developers
Created by Barry on 11/25/2022 in #wrangler
Hi how would I go about using wrangler
where would be the best place to get help on this? @here
5 replies
CDCloudflare Developers
Created by Barry on 11/25/2022 in #wrangler
Hi how would I go about using wrangler
Okay, I realised it's missing compatibility flags, I added those and it's still giving errors. I can make a reproduction repo later but it's easy to reproduce just following the guide in the link I posted, and then trying to run it with wrangler.
5 replies
CDCloudflare Developers
Created by Barry on 11/25/2022 in #wrangler
Hi how would I go about using wrangler
No description
5 replies
CDCloudflare Developers
Created by Barry on 11/25/2022 in #wrangler
Hi how would I go about using wrangler
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'fetch')

return env.ASSETS.fetch(request);
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'fetch')

return env.ASSETS.fetch(request);
5 replies
CDCloudflare Developers
Created by Barry on 11/25/2022 in #wrangler
Hi how would I go about using wrangler
I figured combining npx @cloudflare/next-on-pages --experimental-minify and npx wrangler@latest dev .vercel/output/static/_worker.js should provide a solution, but this is giving errors even on a brand new project
5 replies