next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Next13: Cannot read properties of undefined (reading '')

Open benny856694 opened this issue 2 years ago • 6 comments

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

  1. pnpm install
  2. run dev
  3. open "localhost:3000" page in browser, check the log in backend.

benny856694 avatar Oct 28 '22 03:10 benny856694

I believe this is a duplicate of #41806

james-elicx avatar Oct 28 '22 07:10 james-elicx

I also run into this problem when building my next app. image

theashishmaurya avatar Oct 28 '22 07:10 theashishmaurya

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

benny856694 avatar Oct 28 '22 07:10 benny856694

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.

james-elicx avatar Oct 28 '22 07:10 james-elicx

+1 I had the same error a couple of times

Britnell avatar Oct 28 '22 12:10 Britnell

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.

balazsorban44 avatar Oct 28 '22 17:10 balazsorban44

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>.

timneutkens avatar Nov 01 '22 12:11 timneutkens

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.

github-actions[bot] avatar Dec 02 '22 00:12 github-actions[bot]