I have just upgraded my Angular application from version 10 to version 12 and when I run 'ng serve' there are no build errors, but then in the console it gives me the error "Uncaught RangeError: Wrong length!" from _typed-buffer.js:157. In the stack trace there is app-routing.module.ts:104 and auth-guard.service.ts:12 towards the bottom. I am not sure how to get past this error. None of the application loads because of this. On auth-guard.service.ts line 12 there is
@Injectable()
export class AuthGuardService implements CanActivate {
constructor(private authService: AuthService, private router: Router, private location: Location) {}
I have tried updating to latest node and npm versions 14.17.0 and 7.13.0. I have tried ng update and updating all my packages. Just can't seem to get past this error. There is not much when I search google about this error and Angular 12. Has anybody had this issue?