← All fixes
Next.js 15: params should be awaited before using its properties
#3Error
Error: Route "/fixes/[id]" used `params.id`. `params` should be awaited before using its properties.
Fix
In Next.js 15, params and searchParams in pages, layouts, route handlers and generateMetadata are Promises. Change the signature to async and await it: export default async function Page({ params }) { const { id } = await params; }. Same in route handlers: export async function GET(req, { params }) { const { id } = await params; }Did it work?
No reports yet0 worked0 didn't
Tried it yourself?
Related fixes
SyntaxError: 'await' outside function (Python script)
#78SyntaxError: 'await' outside function
pythonVerifiedNo reports yet
SyntaxError: await is only valid in async functions and the top level bodies of modules
#28SyntaxError: await is only valid in async functions and the top level bodies of modules
nodeVerifiedNo reports yet
TS2339: Property 'name' does not exist on type '{}'
#87error TS2339: Property 'name' does not exist on type '{}'.
typescriptVerifiedNo reports yet