Prebundled React used in standalone server when appDir is enabled #49055
Labels
area: app
App directory (appDir: true)
bug
Issue was opened via the bug report template.
Output (export/standalone)
Related to the the output option in `next.config.js`.
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Fri Jan 27 02:56:13 UTC 2023 Binaries: Node: 18.16.0 npm: 9.6.5 Yarn: N/A pnpm: N/A Relevant packages: next: 13.3.5-canary.1 eslint-config-next: 13.3.4 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true), Standalone mode (output: "standalone")
Link to the code that reproduces this issue
https://github.com/Yovach/next-standalone-trpc
To Reproduce
1- Clone
2- npm install
3- npm run dev
4- Go to localhost:3000
5- You should see TypeError: Cannot read properties of null (reading 'useState') in the console
Describe the Bug
Before Next.js 13.3.2, it was working correctly but after the update, we have an error server-side that says
TypeError: Cannot read properties of null (reading 'useState')
.As you can see, I enabled
appDir
and it's crashing but if this feature is disabled, the website is working properly.It seems to be the same issue as #42588
Expected Behavior
The website should not showing any error with tRPC and Next.js 13.3.2
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: