Describe the bug
After #14947, the ecommerce template fails pnpm build with a TypeScript error in src/utilities/generatePreviewPath.ts:
./src/utilities/generatePreviewPath.ts:1:37
Type error: Cannot find module '@/app/(frontend)/next/preview/route' or its corresponding type declarations.
The utility imports PreviewSearchParams from @/app/(frontend)/next/preview/route, but the route actually lives at src/app/(app)/next/preview/route.ts. The route group was renamed but the import wasn't updated.
To Reproduce
- Scaffold from the e-commerce template
- Run
pnpm build.
- TypeScript check fails with the error above.
Expected behaviour
Template builds cleanly out of the box.
Suggested fix
In templates/ecommerce/src/utilities/generatePreviewPath.ts line 1, change:
import { PreviewSearchParams } from '@/app/(frontend)/next/preview/route'
to:
import { PreviewSearchParams } from '@/app/(app)/next/preview/route'
Environment
- Payload: 3.84.0
- Next.js: 16.2.3
- Node: 20
- Template: ecommerce
Describe the bug
After #14947, the ecommerce template fails
pnpm buildwith a TypeScript error insrc/utilities/generatePreviewPath.ts:The utility imports
PreviewSearchParamsfrom@/app/(frontend)/next/preview/route, but the route actually lives atsrc/app/(app)/next/preview/route.ts. The route group was renamed but the import wasn't updated.To Reproduce
pnpm build.Expected behaviour
Template builds cleanly out of the box.
Suggested fix
In
templates/ecommerce/src/utilities/generatePreviewPath.tsline 1, change:to:
Environment