P is not a function -> Issue in Production Build
Answered
Donskoy posted this in #help-forum
DonskoyOP
I am using latest next js version. with client components. where I have one nested page like : a/b/[id]
URL will be: https://abc.com/a/b/123
when I direct to this route I am getting application server error and logs are not properly getting printed. it says p is not a function. now I am not able to understand where the problem is.
I simply tried to create normal route with https://abc.com/d/123. but that is also not working on server. it is working fine with npm run dev.
URL will be: https://abc.com/a/b/123
when I direct to this route I am getting application server error and logs are not properly getting printed. it says p is not a function. now I am not able to understand where the problem is.
I simply tried to create normal route with https://abc.com/d/123. but that is also not working on server. it is working fine with npm run dev.
6 Replies
@Donskoy I am using latest next js version. with client components. where I have one nested page like : a/b/[id]
URL will be: https://abc.com/a/b/123
when I direct to this route I am getting application server error and logs are not properly getting printed. it says p is not a function. now I am not able to understand where the problem is.
I simply tried to create normal route with https://abc.com/d/123. but that is also not working on server. it is working fine with npm run dev.
Dutch
what happens when you run
npm run dev
and go that routeDonskoyOP
it works fine
Dutch
code ?
DonskoyOP
page.js
function Page() {
return (
<Suspense
fallback={
#Unknown Channel
<Loader />
</>
}
>
<LeagueDetailsPage />
</Suspense>
)
}
LeagueDetailsPage component just return "TEST"
function Page() {
return (
<Suspense
fallback={
#Unknown Channel
<Loader />
</>
}
>
<LeagueDetailsPage />
</Suspense>
)
}
LeagueDetailsPage component just return "TEST"
layout.js
export default function Page({ children }) {
return children
}
export default function Page({ children }) {
return children
}
DonskoyOP
It was the server issue.
Answer