Error occurred prerendering page "/500" and "/404"
Answered
Great golden digger wasp posted this in #help-forum
Great golden digger waspOP
I'm using appDir, but somewhy get an error while building.
When i run next dev, everything works fine.
Help pls
When i run next dev, everything works fine.
Help pls
Answered by Great golden digger wasp
I found a solution:
I have two projects that use Next.js, and they share the same parent folder. Initially, I tried installing the latest versions of Next.js, React, and React DOM in the parent folder using the command:
npm install next@latest react@latest react-dom@latest
/parent
- package.json
/client
/admin
However, for some reason, it didn't work as expected. To resolve the issue, I individually installed the dependencies in each child folder (client and admin) using:
npm install next@latest react@latest react-dom@latest
This approach successfully resolved the problem.
I have two projects that use Next.js, and they share the same parent folder. Initially, I tried installing the latest versions of Next.js, React, and React DOM in the parent folder using the command:
npm install next@latest react@latest react-dom@latest
/parent
- package.json
/client
/admin
However, for some reason, it didn't work as expected. To resolve the issue, I individually installed the dependencies in each child folder (client and admin) using:
npm install next@latest react@latest react-dom@latest
This approach successfully resolved the problem.
2 Replies
Great golden digger waspOP
I found a solution:
I have two projects that use Next.js, and they share the same parent folder. Initially, I tried installing the latest versions of Next.js, React, and React DOM in the parent folder using the command:
npm install next@latest react@latest react-dom@latest
/parent
- package.json
/client
/admin
However, for some reason, it didn't work as expected. To resolve the issue, I individually installed the dependencies in each child folder (client and admin) using:
npm install next@latest react@latest react-dom@latest
This approach successfully resolved the problem.
I have two projects that use Next.js, and they share the same parent folder. Initially, I tried installing the latest versions of Next.js, React, and React DOM in the parent folder using the command:
npm install next@latest react@latest react-dom@latest
/parent
- package.json
/client
/admin
However, for some reason, it didn't work as expected. To resolve the issue, I individually installed the dependencies in each child folder (client and admin) using:
npm install next@latest react@latest react-dom@latest
This approach successfully resolved the problem.
Answer
Fire ant
Is your component is client side? Try add 'use client'; on client component