Comments (6)
@jizhi0v0 I understand what you are trying to say. However, I need the page to be static not dynamic.
However, the default behavior for Static pages during Draft mode is Dynamic
https://nextjs.org/docs/app/building-your-application/configuring/draft-mode
Draft mode is usually used when you work with CMS so the admin will have the ability to change static pages and view the changes in real time instead of requiring rebuilds or invalidate the cache on change. ( so the page will be dynamic during that time only)
from next.js.
I have created another issue #66282 for the MaxListenersExceededWarning.
from next.js.
Add "use client" at the top of /home/page.tsx.
from next.js.
@jizhi0v0 adding "use client" makes the page client side. The Idea here is to use static page, so it should stay server side.
There is a huge change of behavior between versions which is not announced in the blogs. Which means it is unexpected behavior ( a bug ) that occurred.
from next.js.
@jizhi0v0 adding "use client" makes the page client side. The Idea here is to use static page, so it should stay server side.
There is a huge change of behavior between versions which is not announced in the blogs. Which means it is unexpected behavior ( a bug ) that occurred.
Add "use client" or switch to 'force-dynamic'.I don't know if what I said is correct, I hope it can help you
https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config
'force-dynamic': Force dynamic rendering, which will result in routes being rendered for each user at request time. This option is equivalent to getServerSideProps() in the pages directory.
from next.js.
I am experiencing a similar issue after upgrading Next.js from 14.0 to 14.2.3, with the difference that we are not using draft mode, but we are using server side generated pages fetching content from a CMS using Apollo client. The server will not stop when I use ctrl + c
and the memory limit warning is displayed. This is when using next build
then next start
. The issue does not occur when running next dev
.
from next.js.
Related Issues (20)
- Turbo: json-schema-to-typescript package errors (Cannot convert undefined or null to object)
- npm run dev never finish to compile HOT 3
- project builds in Vercel but link only populates "Application error: a server-side exception has occurred" and Runlog indicates PrismaClientInitializationError
- Docs: App Router "Adding Authentication" page does not 'use server' in code.
- NextURL strips trailing slashes, even when config is set to manual trailing slash handling
- Application Crash when google translated and dropdown is chose. HOT 2
- Page is remounted when params change in (optional) catch all routes
- Middleware URL normalization does not respect `skipTrailingSlashRedirect`
- Docs: "Edit this Page on Github" Button links to nonexistent paths on some pages
- Turbopack error with next-auth middleware: `_react.default.createContext is not a function` HOT 3
- Suspense does not work as expected in Page Router index.js HOT 1
- Getting error During Build HOT 2
- Not seeing not-found page on production deployment with dynamicParams = false HOT 1
- Not seeing not-found page on production deployment with dynamicParams = false HOT 3
- Error occurred prerendering page "/". ReferenceError: self is not defined
- Cannot set Content-Type header for api route response (pages router) HOT 4
- Redis cache handler example incorrect
- Error happens when route handler called with suspense enabled HOT 3
- Warning about missing sharp package with sharp^0.33
- Turbopack: --turbo couldn't dayjs molude resolution within cal-heatmap library. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.