Closed austin-raey closed 11 months ago
Is the project using SSR?
@stickyburn Apologies for the very late response,
Yes, I believe this is configured to use SSR in this example. Since the { ssr }
option is not configured, I believe this means it defaults to true
as noted here: https://start.solidjs.com/api/vite. π
Interesting. I asked because the same issue happens with client side rendering.
In setting up for SolidStart's next Beta Phase built on Nitro and Vinxi we are closing all PRs/Issues that will not be merged due to the system changing. If you feel your issue was closed by mistake. Feel free to re-open it after updating/testing against 0.4.x release. Thank you for your patience.β¨β¨See https://github.com/solidjs/solid-start/pull/1139 for more details.
Duplicates
Latest version
Current behavior π―
When using the
solid-start-cloudflare-pages
in combination with@solid-auth/base
or@solid-mediakit/auth
, and deploying to Cloudflare Pages, the build will fail with the following error:Expected behavior π€
Functions would successfully publish without a
process undefined
error.Steps to reproduce πΉ
Steps:
pnpm create solid
choosing "with auth-js"solid-start-cloudflare-pages
using the steps outlined here a. i.e.pnpm install solid-start-cloudflare pages
, addplugins: [solid({ adapter: cloudflare({}) })]
tovite.config.js
.dist/public
as the build output directory.process is not defined
error.Optionally after step 2, you may also replace
@solid-js/auth
with@solid-mediakit/auth
and make relevant code updates to the generated project, noted here. Being that@solid-js/auth
points to the other package, I assume@solid-mediakit/auth
is the maintained version going forward.This repo has everything configured with
@solid-mediakit/auth
.Further, note that somewhere in the generated
[[path]].js
the following code:Context π¦
I was testing the waters with a few frameworks (Qwik, SvelteKit, SolidStart) for a particular stack combination I'm looking for:
SvelteKit and Qwik are able to deploy successfully to CloudFlare, however, solid's
authjs
package seems to exclusively useprocess
to grab a few environment variables.It seems to me this would need to be updated to safely check if
process
exists, and then probably use some Cloudflare specificglobal
-type thing instead.I'd love to open a PR / look into this for you guys, although I'm not sure where
@solid-mediakit/auth
is hosted. It would be awesome to open the door to another JAMStack provider like Cloudflare!solid-start
also is one of the few out there that properly allow to do local development via Miniflare so you can actually have access to Cloudflare Bindings without needing to build / preview.Your environment π