Code Monkey home page Code Monkey logo

Comments (6)

AnasArafeh avatar AnasArafeh commented on July 3, 2024 1

@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.

AnasArafeh avatar AnasArafeh commented on July 3, 2024

I have created another issue #66282 for the MaxListenersExceededWarning.

from next.js.

jizhi0v0 avatar jizhi0v0 commented on July 3, 2024

Add "use client" at the top of /home/page.tsx.

from next.js.

AnasArafeh avatar AnasArafeh commented on July 3, 2024

@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 avatar jizhi0v0 commented on July 3, 2024

@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.

chrisrhymes avatar chrisrhymes commented on July 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.