4

I have one angular library that is being built in Angular 10.

Now while making a new angular app in Angular 13, we are trying to use that library but it is giving some issues.

I know the compilation has been changed to 100% IVY in Angular 13, but is there any way I can actually use that Angular 10 library in new project

It gives following warning

 Project is attempting to disable the Ivy compiler. Angular versions 12 and higher do not support the deprecated View Engine compiler for applications. The Ivy compiler will be used to build this project. 
    For additional information or if the build fails, please see https://angular.io/guide/ivy

The Error that I get is

(node:41343) UnhandledPromiseRejectionWarning: Error: The target entry-point  has missing dependencies:
Sahil Julka
  • 75
  • 1
  • 6
  • 1
    I'm having the same issue. Have you found a solution? It's our library so we can upgrade it, but I was curious if there was another solution. – Bill Jun 17 '22 at 04:23
  • seems I can use it but jest-preset-angular doesn't like it with ngcc etc. get/index.ts:1 ({"Object.":function(module,exports,require,__dirname,__filename,jest){export * from './api/api'; – evanjmg Jun 20 '22 at 16:42
  • @Bill I was able to make in working using "postinstall": "ngcc" in package.json of consumer app i.e angular 13 application – Sahil Julka Jul 10 '22 at 09:14

1 Answers1

1

I was able to make it work using "postinstall": "ngcc" in Angular 13 consumer app. ngcc makes the library compatible

Sahil Julka
  • 75
  • 1
  • 6