-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
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
test: add D1 + Cloudflare Pages + Nuxt 3 #5040
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
@jkomyno note that this fails with
|
Uhm 🧐 |
Random discovery: |
Cloudflare Pages is up: https://f0902f19.d1-cfpages-nuxt.pages.dev/api |
API endpoint currently returns
|
So the custom output step is failing and I found that when the Prisma Client is imported from a custom location files are missing from the build. What is expected
But this is the output with
This is only a problem when using Locally, it can be reproduced with after running:
Which also changes
to
I found that the solution to this is to change
import nitroCloudflareBindings from 'nitro-cloudflare-dev'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
modules: [nitroCloudflareBindings],
nitro: {
preset: 'cloudflare-pages',
experimental: {
wasm: true,
},
esbuild: {
options: {
target: 'esnext',
},
},
},
devtools: { enabled: true },
}) |
Ohhhhh, the |
Note: I tried prisma/prisma#22827 (comment) along the way but it did not work |
This PR closes https://github.com/prisma/team-orm/issues/1164.