Skip to content
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

Error with DynamicServerError deploying in Vercel #60

Closed
paulcull opened this issue Oct 10, 2023 · 4 comments
Closed

Error with DynamicServerError deploying in Vercel #60

paulcull opened this issue Oct 10, 2023 · 4 comments

Comments

@paulcull
Copy link

Hi,

I have an issue deploying in vercel.

$ next build

19:39:48.292 | Attention: Next.js now collects completely anonymous telemetry regarding usage.
19:39:48.293 | This information is used to shape Next.js' roadmap and prioritize features.
19:39:48.293 | You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
19:39:48.293 | https://nextjs.org/telemetry
19:39:48.293 |  
19:39:48.383 | Creating an optimized production build ...
19:40:02.951 | ✓ Compiled successfully
19:40:02.951 | Linting and checking validity of types ...
19:40:09.465 | Collecting page data ...
19:40:12.577 | Generating static pages (0/9) ...
19:40:12.666 | Generating static pages (2/9)
19:40:12.723 | Generating static pages (4/9)
19:40:12.724 | DynamicServerError: Dynamic server usage: Page couldn't be rendered statically because it used cookies. See more info here: https://nextjs.org/docs/messages/dynamic-server-error
19:40:12.724 | at staticGenerationBailout (/vercel/path0/.next/server/chunks/859.js:1:3931)
19:40:12.724 | at Object.cookies (/vercel/path0/.next/server/chunks/859.js:1:1519)
19:40:12.724 | at w.getCookie (/vercel/path0/.next/server/chunks/207.js:1:4965)
19:40:12.724 | at w.getItem (/vercel/path0/.next/server/chunks/207.js:1:12982)
19:40:12.725 | at getItemAsync (/vercel/path0/.next/server/chunks/705.js:1:50595)
19:40:12.725 | at SupabaseAuthClient._recoverAndRefresh (/vercel/path0/.next/server/chunks/705.js:1:32089)
19:40:12.725 | at SupabaseAuthClient._initialize (/vercel/path0/.next/server/chunks/705.js:1:11941)
19:40:12.725 | at /vercel/path0/.next/server/chunks/705.js:1:11215
19:40:12.725 | at /vercel/path0/.next/server/chunks/705.js:1:21707
19:40:12.725 | at SupabaseAuthClient.lockNoOp [as lock] (/vercel/path0/.next/server/chunks/705.js:1:8633) {
19:40:12.726 | digest: 'DYNAMIC_SERVER_USAGE'

looking up there is workaround using export const dynamic = "force-dynamic" when using cookies, but this is already there in page.tsx

anyone else?

@Marfuen
Copy link
Contributor

Marfuen commented Oct 10, 2023

Hi, @paulcull is this from one of the existing pages or is it a new one you made?

@paulcull
Copy link
Author

paulcull commented Oct 10, 2023

default - just forked and manually manually created the env's - just resync'd fork and same issue

there is a warning in the build
warning " > next-multipart@0.5.1" has incorrect peer dependency "next@^12.0.7".

@Marfuen
Copy link
Contributor

Marfuen commented Oct 11, 2023

@paulcull As you mentioned earlier you have to put that export const dynamic code, in the page, not sure which page could be causing this.

@paulcull
Copy link
Author

last commits seem to have fixed this so closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants