0

I'm trying to deploy my Angular project in Vercel and I keep getting this error message:

✘ [ERROR] The 'quote/:categoryId' route uses prerendering and includes parameters, but 'getPrerenderParams' is missing. Please define 'getPrerenderParams' function for this route in your server routing configuration or specify a different 'renderMode'.

I've gone through my app.routes.ts several times and the problem is not persists.

import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { HomeComponent } from './pages/home/home.component';
import { QuoteComponent } from './pages/quote/quote.component';

export const routes: Routes = [
  { path: '', component: HomeComponent },
  { path: 'quote/:categoryId', component: QuoteComponent },
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule { }
2
  • Do you use prerendering by choice? You might want to add app.routes.server.ts and configure routes there as well: angular.dev/guide/ssr#customizing-build-time-prerendering-ssg Commented Jul 10 at 11:13
  • Thank you for your answer Bojan, I actually didn't need prerendering in my app, so decided to delete de prerender and ssr and it worked out fine. Regards Commented Aug 25 at 11:53

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.