Questions tagged [angular-upgrade]

Questions related to upgrading AngularJS (v1.x) application to Angular (v2+). This tag should be used for questions related to preparing AngularJS application for upgrade, running a hybrid AngularJS/Angular application, and transitioning out of hybrid mode.

213 questions
4
votes
0 answers

ng update not running migration.json schematic

Versions node --version v8.11.3 npm --version 6.4.1 ng --version _ _ ____ _ ___ / \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | …
Tanzeel
  • 455
  • 6
  • 16
4
votes
1 answer

error TS2339: Property 'do' does not exist on type 'Observable<

Trying to upgrade from angular 5.2 to angular 6.0.0, we are running into the following error: error TS2339: Property 'do' does not exist on type 'Observable< Any ideas why? The Code where we are using is return…
kanchirk
  • 912
  • 2
  • 13
  • 29
4
votes
0 answers

Angular UpgradeModule $rootScope.$digest error, even though we are not triggering a digest manually

We have a super weird login bug that appears to be caused by this line in Angular's UpgradeModule, so I have a question about that line. why is: var subscription = _this.ngZone.onMicrotaskEmpty.subscribe(function () { return $rootScope.$digest();…
Andrew Luhring
  • 1,762
  • 1
  • 16
  • 37
4
votes
1 answer

How to use 3rd party AngularJS (1.6) module (angular-translate) in Angular (2 or 4)

The case I am in the process of upgrading an AngularJS (i.e. Angular 1.6) application to Angular (i.e. Angular 4.1.3). I chose to do the incremental upgrade so currently both AngularJS and Angular are bootstrapped and running. So far so good, but:…
Anton
  • 2,458
  • 2
  • 18
  • 30
4
votes
1 answer

Unexpected token export - Angular 2

I am trying to import import { UpgradeComponent } from '@angular/upgrade/static'; for using angular1 directive in angular2 using ngupgrade but I am getting this error. Code: import { Directive, ElementRef, Injector } from '@angular/core'; import {…
Johnson Samuel
  • 2,046
  • 2
  • 18
  • 29
3
votes
0 answers

What is the proper way to fix the compilation error after upgrading Angular 7.x to Angular 13.x?

I've a task to upgrade Angular v7.x to v13.x app, i followed the steps as per angular official documentation but getting below issues when executing ng serve Samples ------- Error: src/app/app.component.ts:1:46 - error TS2792: Cannot find module…
Flavio
  • 123
  • 2
  • 12
3
votes
1 answer

An unhandled exception occurred: The requested module 'sourcemap-codec' does not provide an export named 'decode'

On Upgrading, to angular 13, My build step on pipeline is failing. My initial version was 11, on upgrading to 12 the build worked fine but on upgrading from 12 to 13, it started giving me this error on pipeline. The build is running fine on local…
Vijit Wadhwa
  • 55
  • 1
  • 6
3
votes
1 answer

ng update @angular/core@10 @angular/cli@10 isn't working

I have an app that runs under the angular v9.1.11. I'm trying to update it to angular 12 with the following command ng update @angular/core@10 @angular/cli@10 like recommended on their website https://update.angular.io/?v=9.1-12.0. But I get the…
Raphaël Balet
  • 6,334
  • 6
  • 41
  • 78
3
votes
3 answers

Error in ng update @angular/core when upgrading Angular 9.1.11 to Angular 10

I am trying to update my exisiting angular 9 project to Angular 10, using the steps given in the official docs. ng update @angular/cli worked fine. But,I am getting an error in the next step. ng update @angular/core Error - Package…
Daisy
  • 73
  • 1
  • 10
3
votes
3 answers

Upgrade from angular 8.2 to angular 9 issue

When Upgrading from angular 8.2 to angular 9 I got this error An unhandled exception occurred: Cannot find module '@angular-devkit/schematics' How can I overcome this error? this is the used command: ng update @angular/core @angular/cli --next
narouz
  • 195
  • 1
  • 2
  • 8
3
votes
0 answers

In an angular hybrid app, how exactly does downgradeModule work in relation to the Angular zone?

I'm mainly interested in the impact of this line in their documentation: Unlike UpgradeModule, downgradeModule() does not bootstrap the main AngularJS module inside the Angular zone. Does this mean that just the initial bootstrap of the…
3
votes
1 answer

Error: [$injector:unpr] Unknown provider - while migrating AngularJS1 to Angular6

I'm trying to do upgrade components written in AngularJS1 to Angular6. I'm taking the approach of having the wrappers for all the existing AngularJS1 component by extending "UpgradeComponent" placed under the folder "directive-wrappers" in my…
Krishnan
  • 958
  • 5
  • 21
  • 44
3
votes
1 answer

error by upgrading angular from 7.2.15: minTimeout is greater than maxTimeout

I have a current angular app with 7.2.15 and I tried to upgrade with the command ng update @angular/cli @angular/core I became this error and I don't understand why: Using package manager: 'npm' Collecting installed dependencies... Found 48…
Jesus Peralta
  • 661
  • 1
  • 8
  • 18
3
votes
2 answers

How to upgrade angular version from 7 to 8?

Running ng update @angular/cli @angular/core I would get this every time Package "@angular/compiler-cli" has an incompatible peer dependency to "@angular/compiler" (requires "8.2.0-next.1", would install "8.1.1") Package "ag-grid-angular" has…
SVK
  • 2,107
  • 2
  • 20
  • 41
3
votes
2 answers

How to add this AngularJS HTML template to my Angular 8 project

The problem is that I have lots of HTML templates that include < script > tags with AngularJS code in them. My current project is using Angular 8, and one critical part of it consists basically in usign all the AngularJS templates that I have inside…
1 2
3
14 15