Nextjs13 - TypeError: Cannot read properties of undefined (reading 'call')
See original GitHub issueVerify canary release
- I verified that the issue exists in the latest Next.js canary release
Which example does this report relate to?
none
What browser are you using? (if relevant)
Version 1.46.144 Chromium: 108.0.5359.128 (Official Build) (64-bit)
How are you deploying your application? (if relevant)
No response
Describe the Bug
I am trying out the new nextJS 13 app directory but i keep getting TypeError: Cannot read properties of undefined (reading 'call')
on the client side when i use a component with 'use client'
i use "next": "13.0.7"
AppInfo.tsx
'use client'
export default function AppInfo() {
return (
<>
<h1>client</h1>
</>
)
}
page.tsx
import AppInfo from './appinfo';
export default async function Dashboard() {
return (
<>
<div className="flex flex-col gap-5 max-w-[1028px] mx-auto px-4">
<h1 className="mt-5 text-3xl font-light">
👋 Hi, <span className="font-bold text-gray-400 ">Admin</span>
</h1>
<AppInfo/>
</div>
</>
)
}
Expected Behavior
no error
To Reproduce
AppInfo.tsx
'use client'
export default function AppInfo() {
return (
<>
<h1>client</h1>
</>
)
}
page.tsx
import AppInfo from './appinfo';
export default async function Dashboard() {
return (
<>
<div className="flex flex-col gap-5 max-w-[1028px] mx-auto px-4">
<h1 className="mt-5 text-3xl font-light">
👋 Hi, <span className="font-bold text-gray-400 ">Admin</span>
</h1>
<AppInfo/>
</div>
</>
)
}
Issue Analytics
- State:
- Created 9 months ago
- Reactions:5
- Comments:13
Top Results From Across the Web
Cannot read properties of undefined (reading 'call') on Next.js ...
Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'call') Call Stack options.factory ...
Read more >Cannot read property 'call' of undefined - random error after ...
After running npm run build && NODE_ENV=production node server.js when opening the application I am getting this error TypeError: Cannot read ...
Read more >nextjs typeerror: cannot read properties of undefined (reading ...
I have error: 'TypeError: Cannot read properties of undefined (reading 'map')'. I understand what this error means. But I still understand, why ingredients....
Read more >Cannot Read Property Length of Undefined in JavaScript
The JavaScript TypeError: Cannot read property 'length' of undefined occurs when the length property is read on an undefined variable.
Read more >getInitialProps - Data Fetching - Next.js
getInitialProps receives a single argument called context , it's an object with the following properties: pathname - Current route.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Seems to be OK in MacOS environment but got the same error on Windows.
I’m having the same issue just by creating a new project with
npx create-next-app@latest --experimental-app
and typescriptThis issue only occurs when I use the experimental app directory