Closed darthwade closed 1 year ago
Btw, during deployment I also encountered "Error: Could not access built-in Node.js modules. Please make sure that your Cloudflare Pages project has the 'nodejs_compat' compatibility flag set."
adding node_compat
to wrangler.toml
didn't help, but applying node_compat via CF dashboard helped
[env.preview]
name = "zeus-web-preview"
workers_dev = true
node_compat = true
compatibility_flags = [ "nodejs_compat" ]
[env.production]
name = "zeus-web"
route = "zeus-3v5.pages.dev/*"
workers_dev = false
node_compat = true
compatibility_flags = [ "nodejs_compat" ]
Yep you have to set node_compat
via the CF dashboard. I'm open to solutions that make that process programatic.
Do you have optimizeCSS set in next.config.js
? Turn it off if you do.
disabled
That's strange. Ensure your fork is up to date with the main branch and re-deploy.
will do, I created it yesterday via pnpm create t4-app
, locally looks good
Updated to latest version from main
branch, so probably there's some problem during building or deployment/cf configuration
https://zeus-3v5.pages.dev
Make sure your CF deployment is set to node 18!
Strange, recreated cf project from scratch with NODE_VERSION 18 env var, but still same problem https://zeus-web.pages.dev
After adding TAMAGUI_TARGET=web
it finally works :)
@timothymiller thanks for help!
"dev": "TAMAGUI_TARGET=web pnpm with-env next dev",
"build": "TAMAGUI_TARGET=web pnpm with-env next build",
"start": "TAMAGUI_TARGET=web pnpm with-env next start",
@darthwade This was originally set, it must have been removed by a recent PR.
I added it back so other people don't experience this. Thanks for debugging!
Hi @timothymiller
Thank you so much for your work on T4. Amazing stack! I have a question, after deployment to Cloudflare pages based on your docs, I see next: https://zeus-3v5.pages.dev
Could you pls help me in what direction should I dig? Thanks once more