Description
I built a 1-to-1 replica of the basic example in this code base and attempted to deploy to cloudflare pages and cloudflare workers. I've narrowed it down to the clerk-solidjs middleware...
When I include the clerk-solidjs middleware.ts file in the app.config.ts and try to build for cloudflare, I get a "500 Request Error - internal server error"
However, when I do not include the middleware then it builds and deploys successfully, however, when I navigate to the /protected route which uses a server function to load the session it throws a "Error | Uncaught Client Exception" page error.
Code example
Issues
This builds successfully, but cannot access /protected route
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
// middleware: "./src/middleware.ts",
server: {
preset: "cloudflare-pages",
rollupConfig: {
external: ["node:async_hooks"]
}
},
vite: {
plugins: [],
},
});
This builds, but throws 500 internal server error
import { defineConfig } from "@solidjs/start/config";
export default defineConfig({
middleware: "./src/middleware.ts",
server: {
preset: "cloudflare-pages",
rollupConfig: {
external: ["node:async_hooks"]
}
},
vite: {
plugins: [],
},
});
Additional context
No response
Description
I built a 1-to-1 replica of the basic example in this code base and attempted to deploy to cloudflare pages and cloudflare workers. I've narrowed it down to the clerk-solidjs middleware...
When I include the clerk-solidjs middleware.ts file in the app.config.ts and try to build for cloudflare, I get a "500 Request Error - internal server error"
However, when I do not include the middleware then it builds and deploys successfully, however, when I navigate to the /protected route which uses a server function to load the session it throws a "Error | Uncaught Client Exception" page error.
Code example
Issues
This builds successfully, but cannot access /protected route
This builds, but throws 500 internal server error
Additional context
No response