-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: appdir option (smaller version) #1567
Conversation
Is this supposed to build ATM? It doesn't for me.
Am I doing something wrong here or is this simply not ready to build yet? |
CI builds - last time I tried it built |
Just tried in 3 different envs:
Following steps:
All 3 resulted in the same error mentioned above 🤷♂️ |
I would love to see this working. Please let me know how I could assist. Next.js documentation: https://nextjs.org/docs/messages/app-static-to-dynamic-error |
Seems to be the line trpc/server.ts // ...
unstable_httpBatchStreamLink({
url: getUrl(),
headers() {
console.log('creating headers...'); // <- Shows in log right before error
const heads = new Map(headers());
heads.set("x-trpc-source", "rsc");
console.log('headers created'); // <- Not showing in logs. Guess `headers()` invocation above throws
return Object.fromEntries(heads);
},
}),
// ... layout.tsx
Build log output
Whilst this seems rather clear, I don't know how to work around this as I don't have enough knowledge about what this |
Hmm, I'll try to have a look at this in the coming days, but we're using this setup at work and it's fine. Afaik, this is the only way to read the incoming request headers for client components during ssr :/ Maybe we need an |
I'm not sure about the actual downsides and whether or not this should be in the default Thanks for the support 🙏, I hope it's ok that I "hijacked" this PR in the way I did 🙈 |
I believe by adding |
Used pnpm create [email protected], did not make any code changes and ran dev server and met this issue with the server side trpc call. ![]() |
thanks for the report. this was due to using a non-3000 port. just pushed a change to make it work on any port. be aware though that next-auth will still require a specific port for most providers including the default discord one |
Thanks for the prompt reply & fix! How do i incorporate the latest changes to the current project? do i need to bootstrap a new one? |
easiest is probably just looking at the diff from the last commits |
Switching from node 18 to 20 fixes this for me |
Co-authored-by: c-ehrlich <[email protected]>
smaller, less opinionated version of #1446
This alternative does not include: