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
177
votes
11 answers

Upgrading to Angular 10 - Fix CommonJS or AMD dependencies can cause optimization bailouts

I am trying to upgrade my Angular 9 app to Angular 10 version, but I am getting the below warning after the upgrade rxjs\BehaviorSubject.js depends on rxjs-compat/BehaviorSubject How can I fix this?
Ora
  • 1,889
  • 2
  • 9
  • 9
124
votes
1 answer

Angular 10 Upgrade - Fix CommonJS or AMD dependencies can cause optimization bailouts

I am trying to upgrade my Angular 9 app to Angular 10 version, but getting below warning after the upgrade WARNING in calendar.reducer.ts depends on lodash/keys. CommonJS or AMD dependencies can cause optimization bailouts. I have added below line…
RRR
  • 3,509
  • 4
  • 29
  • 38
53
votes
1 answer

Data path "" must NOT have additional properties(extractCss) in Angular 13 while upgrading project

I am facing an issue while upgrading my project from angular 8.2.1 to angular 13 version. After a successful upgrade while preparing a build it is giving me the following error. Data path "" must NOT have additional properties(extractCss). I…
Jayesh Vyas
  • 1,145
  • 3
  • 15
  • 35
23
votes
3 answers

Angular/AngularJS Upgrade app unresponsive when browser tab in background

I have an Angular/AngularJS Upgrade App and am currently in the process of migrating everything from AngularJS to Angular. It's a fairly large project so I definitely need to go the Upgrade way. I use the @uirouter/angular-hybrid and have a root…
Nicolas Gehlert
  • 2,626
  • 18
  • 39
17
votes
3 answers

SassError: Can't find stylesheet to import. - Angular upgrade

Recently I updated my angular application to version 14 and after the upgrade, I am getting the below error. The error is below ./src/assets/vendor/default/styles.scss - Error: Module build failed (from…
az rnd
  • 643
  • 3
  • 14
  • 28
17
votes
3 answers

Angular Application Doesn't load up App Module/Components after Upgrade to Angular 8.3.5

We have an Angular 4 project that I've recently tried to upgrade to Angular 8. I followed the migration guide in Angular website, changed some of the syntaxes, and everything preventing project to be built. I faced the problem of my styles were not…
14
votes
1 answer

AngularJS v1x. is not loaded in hybrid angular-cli app

I am combining an angular-cli project with an AngularJS project to slowly upgrade an application. The AngularJS application already uses TypeScript and I am letting the cli handling bundling the application. I have loosely followed Victor Savkin's…
Chic
  • 9,836
  • 4
  • 33
  • 62
10
votes
1 answer

$Injector Error on Angular Upgrade from 1.6.6 to 6

I did Angular upgrade from Angular.Js 1.6.6 to Angular 6 using Webpack 4: import 'core-js/es7/reflect'; import 'zone.js'; import 'reflect-metadata'; import 'rxjs'; import { NgModule } from '@angular/core'; import {…
9
votes
1 answer

How do I inject an AngularJS service in an Angular 5 component?

I'm migrating an AngularJS project to Angular 5 using ngUpgrade but I'm running into a problem when trying to inject an AngularJS service in one of my new components. I followed Angular's upgrade guide and created a serviceProvider that uses the…
Stephan Muller
  • 27,018
  • 16
  • 85
  • 126
8
votes
3 answers

Unable to update Angular from 10 to 11 due to dependency errors

I am following this site and trying to update my project to 11.0 through the following command. npx @angular/cli@11 update @angular/core@11 @angular/cli@11 Every time I run it, it gives me the following error: npm ERR! ERESOLVE could not…
mfs
  • 3,984
  • 6
  • 32
  • 51
8
votes
3 answers

Error when using AngularJS component inside Angular app: "Error: Trying to get the AngularJS injector before it being set."

I'm working through Angular's upgrade guide to learn how to embed AngularJS components in an Angular app. I've created a bare-bones Angular app using the Angular CLI and added a simple AngularJS module as a dependency. When I run ng serve, the…
Nathan Friend
  • 12,155
  • 10
  • 75
  • 125
7
votes
3 answers

Error: Module build failed - Angular migration to 14.2.2

I have upgraded my angular project from 6.0v to 14.2.2v and after doing ng serve I facing the following errors. I tried deleting the node_modules and installing again and I have also tried to install latest @angular-devkit/build-angular but it didnt…
Yash Kawadkar
  • 71
  • 1
  • 1
  • 3
7
votes
5 answers

Angular version update giving an error - Migration failed: Could not find any tsconfig file

I am trying to update an Angular project (in version 8) to version 9. when running the ng update it gives an error saying Migration failed: Could not find any tsconfig file. Cannot migrate dynamic queries. after some time. but when check the…
i_sapumal
  • 222
  • 2
  • 10
7
votes
3 answers

Angular NgUpgrade inject AngularJS service into Angular service; getting: Unhandled Promise rejection: Cannot read property 'get' of undefined ; Zone:

I'm seeing a lot of similar problems on here, but have yet to find a solution that works. What I THINK is happening is that, because our Ng2App is bootstrapped first, it doesnt have a reference to $injector yet, so when I try to use it in my…
Andrew Luhring
  • 1,762
  • 1
  • 16
  • 37
6
votes
0 answers

How to turn on AOT in an angular hybrid application using downgradeModule and angular-cli?

I am migrating an AngularJS application to Angular 7 using the downgradeModule (described here: upgrade for performance). In the last part of that documentation it is stated that I need to import the NgModuleFactory of my AppModule when I want to…
1
2 3
14 15