next.js
next.js copied to clipboard
Next13: Cannot read properties of undefined (reading '')
Verify canary release
- [X] I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System: Platform: win32 Arch: x64 Version: Windows 10 Pro Binaries: Node: 16.17.0 npm: N/A Yarn: N/A pnpm: N/A Relevant packages: next: 13.0.1-canary.0 eslint-config-next: 13.0.0 react: 18.2.0 react-dom: 18.2.0
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
Cannot read properties of undefined (reading '')
Expected Behavior
should not throw this exception
Link to reproduction
https://github.com/benny856694/next13-error
To Reproduce
- pnpm install
- run dev
- open "localhost:3000" page in browser, check the log in backend.
I believe this is a duplicate of #41806
I also run into this problem when building my next app.
I believe this is a duplicate of #41806
I noticed that issue is using 12.3.2-canary.43, not sure if it is Nextjs 13
I believe this is a duplicate of #41806
I noticed that issue is using 12.3.2-canary.43, not sure if it is Nextjs 13
That was just the version number of the canary available at the time, it still had all the same features as nextjs13, I've bumped the canary number I use to the latest.
+1 I had the same error a couple of times
It does sound/look like a duplicate of #41806, but I could reproduce this one locally on my Linux machine, while the other I couldn't. So it seems related but maybe not the same issue.
Closing as duplicate of https://github.com/vercel/next.js/issues/41806. I had a look at your reproduction and the problem is that you're rendering <Head>
from next/head
in the root layout, that should be <head>
.
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.