-
Link to the code that reproduces this issuehttps://github.com/jira-zz/next-logging-test To Reproduce
Current vs. Expected behavior
should be printed to console only
is. But it is not just console.log. For example, writing to a file is also skipped, logging with winston and other. Provide environment informationOperating System:
Platform: linux
Arch: x64
Version: #1 SMP Thu Jan 11 04:09:03 UTC 2024
Available memory (MB): 7759
Available CPU cores: 16
Binaries:
Node: 22.6.0
npm: 10.8.2
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 14.2.11 // Latest available version is detected (14.2.11).
eslint-config-next: 14.2.9
react: 18.3.1
react-dom: 18.3.1
typescript: 5.6.2
Next.js Config:
output: standalone Which area(s) are affected? (Select all that apply)Pages Router, Runtime Which stage(s) are affected? (Select all that apply)next build (local), next start (local), Other (Deployed) Additional contextHappens with production build on my local machine, also when deployed in docker container. Downgrading to next 13 fixes the issue. The function in question is called from server component. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
@jira-zz This actually happens regardless of using When you build your project, we're collecting Page data and generating static pages.
Since your Index page is rendered statically, the result of In Development, we always render pages on-demand, so users don't have to wait for, e.g., revalidation periods. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply. |
Beta Was this translation helpful? Give feedback.
@jira-zz You can force it to be dynamic → https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic.
Or, you can add a revalidate if you don't want it to request new data every time → https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#revalidate.