-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
A new app generated by blitz new
causes Error: DYNAMIC_SERVER_USAGE
#4112
Comments
I'm facing the same issue here is my system
|
Same issue. Blitz version: 2.0.0-beta.24 (global)
Blitz version: 2.0.0-beta.24 (local)
macOS Ventura | darwin-arm64 | Node: v19.0.0
Package manager: npm
System:
OS: macOS 13.2.1
CPU: (8) arm64 Apple M1
Memory: 86.89 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 19.0.0 - ~/.nvm/versions/node/v19.0.0/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.2 - ~/.nvm/versions/node/v19.0.0/bin/npm
npmPackages:
@blitzjs/auth: 2.0.0-beta.24 => 2.0.0-beta.24
@blitzjs/next: 2.0.0-beta.24 => 2.0.0-beta.24
@blitzjs/rpc: 2.0.0-beta.24 => 2.0.0-beta.24
@prisma/client: 4.6.1 => 4.6.1
blitz: 2.0.0-beta.24 => 2.0.0-beta.24
next: 13.2.4 => 13.2.4
prisma: 4.6.1 => 4.6.1
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
typescript: ^4.8.4 => 4.9.5
``` |
Same Here...
|
I got it for the latest beta.25 as well:
|
From my investigation error comes from the last version of next.js change the version in your package.json to next: 13.2 => 13.1 It is working as a temp solution while I investigate this |
@vitaliemiron I read something about it on the beta docs of next 13 Here, But I am using the stable version of next13 (Pages and not App)
|
13.1 works for sure. If you need 13.2 you can temporarily disable suspense inside useQuery
If you have more queries, create a global query client and set suspense as default to false. I don't understand why this error appears, may be someone from the core team could explain to us. |
I am facing the same issue Blitz version: 2.0.0-beta.25 (local) Package manager: npm System: |
Temporary fix before #4113 is merged: |
I have the same issue. Changing the version number in package.json does not fix the issue for me. |
For those experiencing this issue, this worked for me:
|
The issue persists for me and randomly appeared again in my App. I tried all different versions: Next 13.2.4 and 13.3.0 Is there a way to fix this in an existing app? |
Same here with
|
@engelkes-finstreet @vanam are you sure nextjs is getting patched correctly? To make sure nextjs is being patched: you must use You should see this in your logs right at the start:
|
@flybayer I did just
Same error at my Windows machine as well. I chose all default options during project generation: Typescript, Full, npm, React Final Form. Minimal version seems to work fine, though. |
I experienced the same when trying to create a new project this afternoon. Tried playing around with the dependancies and upgrading everything to latest and nuking the lock files and modules and still could not get a new project working. |
Also ran into this, Next 13.3.1. Briefly looked into it, found this part of Blitz codegen not matching up with actual Next source: blitz/packages/blitz/src/cli/utils/codegen-tasks.ts Lines 46 to 47 in 3e8f04e
The problem here is, it's looking for Now, manually applying the needed patch, have to watch for the same thing, towards the end of the patch, needs lowercase as well, so: Then tossing .next directory, starting dev again, no more client errors, though server console now still does show the DYNAMIC_SERVER_USAGE suspense fallback messages. Hope that helps anyone. Haven't looked into providing any PR for this just yet, sorry. |
Looked a little bit further into this, the The onRecoverableError bit didn't appear until 13.0.7 anyways, and the function first only appears in canary for 13.0.8, which became 13.1.0. So current patching is incorrect in various ways:
Here's the thing though, because of: blitz/apps/next13/package.json Line 22 in 3e8f04e
Why even account for anything before Next 13.3.0? So then we should replace patching with just the 13.3.0 and >13.3.1 scenarios, or, even better, up the dependency to Next 13.3.1, and only need my suggested patch correction for 13.3.1? @flybayer , thoughts? |
Hmm, there's more trouble in paradise, found this in my Next 13.3.0 just now:
So yeah, should do some checking if the patch has been applied already, or we'll keep applying again and again... |
Right, so that's fairly simple:
|
Correctly account for Next 13.1 - 13.3.0 Add new for 13.3.1 (Yes, Blitz b26 depends on Next 13.3.0, so we could account for >=13.3 scenarios only) Fixes: blitz-js#4112
Same error here with 13.3.0 Latest stable is:
Problem disappear for me |
We will get a fix out soon, but I wanted to share a bit of context. Internally we're using the same pattern Next.js uses for bailing out of SSR, by throwing an error. They have the logic for ignoring these errors on the client, but unfortunately the error serialization is only implemented for the app directory, not pages directory. So for us to be able to stop patching it, we need Nextjs to add this to pages directory. |
Unfortunately I am still getting the same error with 2.0.0-beta.27. 😢 I have
|
Hi @vanam,
|
I tried clean install in a new folder (both windows and linux). I tried removing |
The same for me a fresh install of beta 2.0.0-beta.27 and I still get the same error |
This ticket should be reopened because the problem still exists with blitz beta 27 when running the commands below.
|
The issue is real. Solved for me against next
|
I have the exact same error with: I am only seeing this in dev mode with |
Probably unrelated but I just checked the commit that fixed the dev issue for me and noticed that I also bumped all next packages to
|
I can still reproduce the issue, so I've created a new issue (#4149) with re-created reproduction repo. |
Following @bravo-kernel hint at updating next to 13.4.4, those steps do work for me… npx blitz@latest new # name "test", TS, +DB, npm, React Hook Form
cd test
npm i next@13.3.4
npx blitz@latest dev |
This issue should be fixed via #4150. |
I still face the issue. Please someone help out.
This is the error: `$ blitz dev
✓ Ready in 30.6s Now, this is the version I am using: `$ blitz -v Package manager: npm System: |
What is the problem?
A new app generated by
blitz new
(Blitz version: 2.0.0-beta.24) causesError: DYNAMIC_SERVER_USAGE
.Reproduction repo with steps: https://github.com/exKAZUu/blitz-new-issue
Paste all your error logs here:
Paste all relevant code snippets here:
Nothing due to a completely new app.
What are detailed steps to reproduce this?
blitz new blitz-new-issue
cd blitz-new-issue
yarn blitz dev
Run
blitz -v
and paste the output here:Please include below any other applicable logs and screenshots that show your problem:
The section of the reproduction steps includes a screenshot.
The text was updated successfully, but these errors were encountered: