Next.js Discord

Discord Forum

APP Router | Nextjs TypeError: something that doesnt called is undefined

Unanswered
Ninhache posted this in #help-forum
Open in Discord
I found this post, and I think, i've a similar error :

https://stackoverflow.com/questions/76904296/typeerror-in-nextjs-app-production-typeerror-undefined-is-not-an-object-eval

In dev env, I got an error saying "headerText" is undefined.." and I'm pretty sure the error is/was the same for the post
But I didnt understood how they fixed it, maybe someone here could help :

-- Call Stack
Navbar
(app-pages-browser)/./src/components/layout/header/navbar.tsx
React
renderWithHooks
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (11121:1)
updateFunctionComponent
node_modules\next\dist\compiled\react-dom\cjs\react-dom.development.js (16290:1)
.....

My component looks like this :

"use client";
// useScopedI18n => comes from next-international/client
export default function Navbar({ session }: { session: Session }) {
  const [isModalOpen, setIsModalOpen] = useState(false);
  const scopedT = useScopedI18n("...");
  ...
}


Anyways, any ideas ?

0 Replies