Open ameetmadan opened 9 months ago
⨯ TypeError: Cannot read properties of undefined (reading 'id')
at GET (webpack-internal:///(rsc)/./src/app/api/entities/[id]/route.ts:15:32)
at /Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:63192
at /Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/lib/trace/tracer.js:133:36
at NoopContextManager.with (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7062)
at ContextAPI.with (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:518)
at NoopTracer.startActiveSpan (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18093)
at ProxyTracer.startActiveSpan (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18854)
at /Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/lib/trace/tracer.js:122:103
at NoopContextManager.with (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7062)
at ContextAPI.with (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:518)
at NextTracerImpl.trace (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/lib/trace/tracer.js:122:28)
at /Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:56649
at AsyncLocalStorage.run (node:async_hooks:346:14)
at Object.wrap (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:37037)
at /Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:54422
at AsyncLocalStorage.run (node:async_hooks:346:14)
at Object.wrap (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:36286)
at /Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:54384
at AsyncLocalStorage.run (node:async_hooks:346:14)
at eI.execute (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:53777)
at eI.handle (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:64450)
at doRender (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/base-server.js:1330:60)
at cacheEntry.responseCache.get.routeKind (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/base-server.js:1540:46)
at ResponseCache.get (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/response-cache/index.js:49:26)
at DevServer.renderToResponseWithComponentsImpl (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/base-server.js:1460:53)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async DevServer.renderPageComponent (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/base-server.js:1853:24)
at async DevServer.renderToResponseImpl (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/base-server.js:1891:32)
at async DevServer.pipeImpl (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/base-server.js:909:25)
at async NextNodeServer.handleCatchallRenderRequest (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/next-server.js:266:17)
at async DevServer.handleRequestImpl (/Users/ameetmadan/Documents/Workspace/saas-mvp-template/node_modules/next/dist/server/base-server.js:805:17)
<w> [webpack.cache.PackFileCacheStrategy] Caching failed for pack: Error: Unable to snapshot resolve dependencies
Working on this
@CodeTorso I also wanted the Mongoose example with the next 14 and am thinking of doing it myself so please let me know what the status of this issue is and if you need any help with this?
Verify canary release
Provide environment information
Which example does this report relate to?
with-mongodb-mongoose
What browser are you using? (if relevant)
Brave
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
Create a version with app router
Expected Behavior
Working when using dynamic route [id], but always returns undefined even with copied code from docs
To Reproduce
Get example "with-mongodb-mongoose" and run