Closed Vette1123 closed 1 week ago
I remember getting that once. Can you try deleting node_modules, installing dependencies again, and running the web app in apps/web
?
cd apps/web
bun run dev
same issue
Getting same error, tried deleting node_modules to no avail.
I believe it's from the const usr = await auth()
line in app/page.tsx
- I logged usr
and it returns a null
value.
Windows OS
hmm, that should be fine tbh, @Vette1123 what operating system are you on?
hmm, that should be fine tbh, @Vette1123 what operating system are you on?
Windows 11
same
maybe I'm unable to reproduce because I'm running on a Mac.
I'm pretty sure this is a bun-related issue. can someone try using npm / pnpm ?
Also, does anyone know why this is the case for windows? https://github.com/Dhravya/cloudflare-saas-stack/issues/11
Also, does anyone know why this is the case for windows? #11
I haven't got this error, i tried running the script, also manual setup, i only faced the issue mentioned here, haven't got the account id issue
but thanks for your response, will try different package manager and let you know
ran npm run dev
in both root and apps/web directory, still same issue
Can you share the apps/web/wrangler.toml
file?
name = "cloudflare-saas-starter" compatibility_date = "2024-03-29" compatibility_flags = [ "nodejs_compat" ] pages_build_output_dir = ".vercel/output/static"
[placement] mode = "smart"
[[d1_databases]] binding = "DATABASE" database_name = "cf-app-db" database_id = "a6a433d1-3b7e-40ab-a322-f14cb8566d4c"
@Dhravya switched to pnpm and still same error
@Vette1123 did you also install dependencies using pnpm?
@Vette1123 did you also install dependencies using pnpm?
yea,
I get this straight from setup and bun run dev
I'm lost I don't even know what I'm looking at! I'm just on this site so I can look like I'm doing something important in front of my girlfriend.
paul, tell your girlfriend that i said hi
to others: this is a bug in wrangler - fixing!
paul, tell your girlfriend that i said hi
to others: this is a bug in wrangler - fixing!
any news?
getting the same error
i tried setting up next project outside without turbo and it worked fine but when cloning the same repo inside turbo getting this issue
with turborepo its not working
paul, tell your girlfriend that i said hi
to others: this is a bug in wrangler - fixing!
Hey did you got any fix for this
getting the same error
i tried setting up next project outside without turbo and it worked fine but when cloning the same repo inside turbo getting this issue
with turborepo its not working
i solved default error by deleting
export const runtime = 'edge'
from page.tsx file
but i was still getting prepare issue as the picture i attached above (it was something wrong with d1, cloudlfrare, wrangler), i swithced to turso and its working fine now, at least until cloudflare errors get solved for windows
but if we will remove this export const runtime = 'edge' then nextauth adapter will not work i think so
but if we will remove this export const runtime = 'edge' then nextauth adapter will not work i think so
it will, give it a try.
auth.js supports both edge and node runtime
not able to figure it out, working fine in a plain next js app but cloning the same in turborepo is giving error
getting this error as well.
Yup same error for me as well on windows. Any possible workaround for this yet?
@codingforfoodllc @ioabhishek @leestreetnet @Vette1123 @paulls597 @jfortez @leestreetnet @Dhravya
After some intense trial and error I have found a fix for this issue.
Go to app/web/package.json and make it
"dev": "next dev --turbo"
And this resolves the D1 connectivity issue and the inital error.
Later I faced some error related to the auth call and stuff made inside page.tsx
⨯ Error:
headers
was called outside a request scope
and that is coz next auth 5.0.0-beta.19 is not really in good terms with --turbo apparently lol (https://github.com/nextauthjs/next-auth/issues/11076) So I specified the version like this "next-auth": "5.0.0-beta.18" instead of "next-auth": "^5.0.0-beta.18" and now everything works like a charm. Also reminder to ditch windows asap! xD
@jivjen thanks for --turbo fix!
Hitting the headers
error now and the 5.0.0-beta18
change didn't fix for me unfortunately. I'll spend some time testing too.
@leestreetnet Try deleting node_modules and package-lock.json from the directories and do a fresh install. Hopefully that should resolve it.
@jivjen this worked - appreciate you
Anyone working on Windows and running into these issues, @jivjen solution worked for me.
@jivjen You are amazing.
I followed your steps regarding how to run the project, but i keep getting this error