Just delving into the world of Next.js and feeling a bit lost with debugging. You can view the code here.
Background: I went through the Amplify Next.js tutorial (although Amplify might not be the issue here), but opted for TypeScript as my language choice. I created an empty tsconfig.json file which was automatically populated. The only .ts files in my project at this point are those generated from Amplify. When running 'next dev', I encounter a cryptic error message:
Error: [object Object]
The call stack does not provide any clues about my own code, leaving me stumped on how to proceed with debugging:
Call Stack
DevServer.renderToResponse
file:///C:/Java/Source/ts-next-amplified/node_modules/next/dist/server/next-server.js (1631:72)
processTicksAndRejections
internal/process/task_queues.js (93:5)
async DevServer.pipe
file:///C:/Java/Source/ts-next-amplified/node_modules/next/dist/server/next-server.js (1148:25)
async Object.fn
file:///C:/Java/Source/ts-next-amplified/node_modules/next/dist/server/next-server.js (949:21)
async Router.execute
file:///C:/Java/Source/ts-next-amplified/node_modules/next/dist/server/router.js (222:32)
async DevServer.run
file:///C:/Java/Source/ts-next-amplified/node_modules/next/dist/server/next-server.js (1125:29)
async DevServer.run
file:///C:/Java/Source/ts-next-amplified/node_modules/next/dist/server/dev/next-dev-server.js (439:20)
async DevServer.handleRequest
file:///C:/Java/Source/ts-next-amplified/node_modules/next/dist/server/next-server.js (320:20)
I attempted to debug in IntelliJ, but the "toggle break on exception" feature seems ineffective in this scenario.
Both IntelliJ and "next lint" do not flag any warnings or errors in the code.