Next.js Discord

Discord Forum

getStaticPath not a function Exception in Nextjs v13 Page Router

Unanswered
Singapura posted this in #help-forum
Open in Discord
Avatar
SingapuraOP
Server Error
TypeError: getStaticPaths is not a function

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
buildStaticPaths
file:///C:/Users/dhaval/Desktop/Infoskies/Code/infoskies-website-v3/node_modules/next/dist/build/utils.js (733:39)
Object.loadStaticPaths
file:///C:/Users/dhaval/Desktop/Infoskies/Code/infoskies-website-v3/node_modules/next/dist/server/dev/static-paths-worker.js (104:46)
process.processTicksAndRejections
node:internal/process/task_queues (95:5)


I am getting this exception in my Nextjs v13.5.5 Page Router, and nowhere I am using the getStaticPath() or anything.

4 Replies

Avatar
joulev
can you make a reproduction repo?
Avatar
SingapuraOP
it's my companies Project, so I can't
but nowhere I am using any SSR thing like getStaticProps() or getStaticPaths() then why this error is thrown?
Avatar
joulev
with this much info i can't help with anything. i need something that i can clone and test locally. https://nextjs-faq.com/minimal-reproduction-repository