You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With 15.2.2, Nextjs can be used as a backend with --api option while installing. Like us, many were using Nextjs as a backend API and that is why I was chasing on having this option. Finally it is there. When i tried to upgrade the current project by removing React and React DOM in package.json making it exactly same as the fresh project, the build is not happening. The error I am getting is : Error: Cannot find module 'react'. How do we change our current project which does not have any front end component to --api project ? This needs to be documented please.
Is there any context that might help us understand?
Upgrading Nextjs backend project to --api
Does the docs page already exist? Please link to it.
No response
The text was updated successfully, but these errors were encountered:
TypeError: Cannot read properties of null (reading 'useContext')
at g (.next/server/pages/_error.js:1:7386)
Error occurred prerendering page "/404". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of null (reading 'useContext')
at exports.useContext (/Users/code/node_modules/.pnpm/react@19.0.0-rc-04bd67a4-20240924/node_modules/react/cjs/react.production.js:489:33)
at g (/Users/code/auth-api/.next/server/pages/_error.js:1:7386)
at renderWithHooks (/Users/code/auth-api/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-server.edge.production.js:4189:18)
at renderElement (/Users/code/auth-api/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-server.edge.production.js:4327:14)
at retryNode (/Users/code/auth-api/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-server.edge.production.js:4871:16)
at renderNodeDestructive (/Users/code/auth-api/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-server.edge.production.js:4689:7)
at renderNode (/Users/code/auth-api/node_modules/.pnpm/react-dom@19.0.0_react@19.0.0/node_modules/react-dom/cjs/react-dom-server.edge.production.js:5128:14)
What is the documentation issue?
With 15.2.2, Nextjs can be used as a backend with --api option while installing. Like us, many were using Nextjs as a backend API and that is why I was chasing on having this option. Finally it is there. When i tried to upgrade the current project by removing React and React DOM in package.json making it exactly same as the fresh project, the build is not happening. The error I am getting is : Error: Cannot find module 'react'. How do we change our current project which does not have any front end component to --api project ? This needs to be documented please.
Is there any context that might help us understand?
Upgrading Nextjs backend project to --api
Does the docs page already exist? Please link to it.
No response
The text was updated successfully, but these errors were encountered: