Issue with imports/exports in library since migrating to angular 9 and Ivy

577 Views Asked by At

I am using ng-inline-svg (latest version i.e. 10.0.0) and I am trying to migrate a library to angular 9 with Ivy. Since updating the angular version, I get the following error:

ERROR in Symbol InlineSVGModule declared in C:/git/XXX/node_modules/ng-inline-svg/lib_commonjs/inline-svg.module.d.ts is not exported from ng-inline-svg (import into C:/git/XXX/src/app/app.module.ts)

I have imported the inline svg module as follows in app.module.ts:

InlineSVGModule.forRoot(),

Can someone please help?

edit: Please note that this happens when building in aot

1

There are 1 best solutions below

0
Andro Sid On

as temporary solution you can try disable ivy in your tsconfig.json

{
  "compilerOptions": {
    // ...
  },
  "angularCompilerOptions": {
    "enableIvy": false,
    "allowEmptyCodegenFiles": true
  }
}