That is amazing, I can now render static pages without constantly hiding /app , though modals partially work, weird if I directly upload to netlify nothing works at all, but when I use netlify cli, some function is restored. I will take a break for now and communicate tomorrow. I am happy at least some is visible now
Hello, I don’t understand what happened.
I updated my site, because modals on mobile displayed incorrectly.
After modifying, I got:
C:\Users\AAA\Desktop\zgfp2>next build && next export
▲ Next.js 15.2.0
- Environments: .env
Creating an optimized production build ...
✓ Compiled successfully
✓ Linting and checking validity of types
✓ Collecting page data
Error occurred prerendering page "/_not-found". Read more: https://nextjs.org/docs/messages/prerender-error
TypeError: Cannot read properties of null (reading 'useContext')
at t.useContext (C:\Users\AAA\Desktop\zgfp2\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:124:6206)
at R (C:\Users\AAA\Desktop\zgfp2\.next\server\chunks\891.js:5:18998)
at nL (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:46773)
at nU (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:48548)
at nU (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:64360)
at nq (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:67434)
at nH (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:65009)
at nG (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:70865)
at nU (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:60898)
at nq (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\dist\compiled\next-server\app-page.runtime.prod.js:76:67434)
Export encountered an error on /_not-found/page: /_not-found, exiting the build.
⨯ Next.js build worker exited with code: 1 and signal: null
I literally did nothing but use builder to change modal size. What’s happening?
I already cleaned the package json, modules and next folder
Hello @daedalus2,
Could you confirm if you are still seeing the last reported error?
Hello @daedalus2,
I wanted to check in to see if you’re still experiencing issues with building your app. If you are, please feel free to let us know—we’re happy to help!
Best regards,
Hello Manish I get this error when doing ‘‘next build’’
TypeError: Cannot read properties of null (reading 'useContext')
at g (C:\Users\AAA\Downloads\chinese-app-template\.next\server\pages\_error.js:6:11953)
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 (C:\Users\AAA\Downloads\chinese-app-template\node_modules\react\cjs\react.production.js:488:33)
at g (C:\Users\AAA\Downloads\chinese-app-template\.next\server\pages\_error.js:6:11953)
at renderWithHooks (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\node_modules\react-dom\cjs\react-dom-server.edge.production.js:4189:18)
at renderElement (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\node_modules\react-dom\cjs\react-dom-server.edge.production.js:4327:14)
at retryNode (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\node_modules\react-dom\cjs\react-dom-server.edge.production.js:4871:16)
at renderNodeDestructive (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\node_modules\react-dom\cjs\react-dom-server.edge.production.js:4689:7)
at renderNode (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\node_modules\react-dom\cjs\react-dom-server.edge.production.js:5128:14)
at renderChildrenArray (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\node_modules\react-dom\cjs\react-dom-server.edge.production.js:5019:7)
at retryNode (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\node_modules\react-dom\cjs\react-dom-server.edge.production.js:4885:9)
at renderNodeDestructive (C:\Users\AAA\AppData\Roaming\npm\node_modules\next\node_modules\react-dom\cjs\react-dom-server.edge.production.js:4689:7)
Export encountered an error on /_error: /404, exiting the build.
⨯ Next.js build worker exited with code: 1 and signal: null
Hello @daedalus2,
I couldn’t reproduce the same error on my end. Could you please update your code in a GitHub repository and share a link to a reproducible repo? This will help me investigate further.
Thank you