Luis Olivares
Luis Olivares

Reputation: 231

Ionic Angular 19 deployment issues in Vercel

I recently updated my ionic-angular app from version 18 to 19 and after that the deployment in Vercel didn't work any more. I spend 2 day looking for a solution but there was not any clue.

These were some of the issues my project thrown: Angular Ionic error in Vercel

I guess this error is because angular 18 used “builder”: “@angular-devkit/build-angular:browser” and now Angular 19 uses “builder”: “@angular-devkit/build-angular:application”.

Upvotes: 0

Views: 69

Answers (1)

Luis Olivares
Luis Olivares

Reputation: 231

SOLUTION:

I found a workaround to deploy ionic-angular 19.x to Vercel. You have to change the builder options inside angular.json.

Change “builder”: "@angular-devkit/build-angular:application

To

“builder”: “@angular-devkit/build-angular:browser-esbuild”

Change “outputPath”:{“base”: “www”}

To

“outputPath”: “www”

Change “browser”:“sr/main.ts”

To

“main”:“sr/main.ts”

After that build your project as usual and deploy to Vercel.

This works for me and now I can deploy my ionic/angular app in Vercel. I think the problem is the new Angular’s builder “application”. It includes some nodejs modules for Server Side Rendering and that is not allowed in Vercel.

I hope this helps you too.

Angular configuration works

Upvotes: 0

Related Questions