You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
✨ Upload complete!
Success: Assets published!
Error: Failed to publish your Function. Got error: Uncaught ReferenceError: process is not defined at functionsWorker-0.6340363868935264.js:8850:17
Expected behavior 🤔
Functions would successfully publish without a process undefined error.
Steps to reproduce 🕹
Steps:
pnpm create solid choosing "with auth-js"
Manually add solid-start-cloudflare-pages using the steps outlined here
a. i.e. pnpm install solid-start-cloudflare pages, add plugins: [solid({ adapter: cloudflare({}) })] to vite.config.js.
Go to CloudFlare, link the repo with the project produced by these steps and let it build. Ensure you choose dist/public as the build output directory.
You will receive the 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:
I was testing the waters with a few frameworks (Qwik, SvelteKit, SolidStart) for a particular stack combination I'm looking for:
Some full-stack framework of those 3,
Auth.js,
Cloudflare Pages
SvelteKit and Qwik are able to deploy successfully to CloudFlare, however, solid's authjs package seems to exclusively use process 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 specific global-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 🌎
`pnpm` 8, `node` 18, Cloudflare Pages
The text was updated successfully, but these errors were encountered:
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. 😄
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 #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 herea. 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 🌎
The text was updated successfully, but these errors were encountered: