Angular 8 Enable Ivy Error - Value at position 0 in the NgModule.importss of FirebaseModule is not a reference: [object Object]

Viewed 6670

I have a repo in github that you can see here and I'm trying to enable Ivy but without luck yet.

The error that is showing is:

ERROR in src/app/shared/modules/firebase.module.ts(7,12): error TS-991010: Value at position 0 in the NgModule.importss of FirebaseModule is not a reference: [object Object]
node_modules/@ismaestro/ngx-scroll-to-first-invalid/ngx-scroll-to-first-invalid.module.d.ts(1,22): error TS-996002: Appears in the NgModule.imports of SharedModule, but could not be resolved to an NgModule class
node_modules/@ismaestro/ngx-scroll-to-first-invalid/ngx-scroll-to-first-invalid.module.d.ts(1,22): error TS-996003: Appears in the NgModule.exports of SharedModule, but could not be resolved to an NgModule, Component, Directive, or Pipe class
src/app/shared/shared.module.ts(58,14): error TS-996002: Appears in the NgModule.imports of HeroesModule, but itself has errors
src/app/shared/modules/firebase.module.ts(18,14): error TS-996002: Appears in the NgModule.imports of AppBrowserModule, but could not be resolved to an NgModule class
src/app/shared/shared.module.ts(58,14): error TS-996002: Appears in the     NgModule.imports of AppBrowserModule, but itself has errors
src/app/app.browser.module.ts(71,14): error TS-996002: Appears in the     NgModule.imports of AppServerModule, but itself has errors

Steps to reproduce:

  1. Clone the repo: https://github.com/Ismaestro/angular8-example-app.git.
  2. In this file tsconfig.browser.ts enable Ivy like this:

    "angularCompilerOptions": {
       "enableIvy": true
    }
    
  3. Run:

    npm i
    npm start
    

I have no idea what to do... :D

Thanks!!

Isma

1 Answers

I had the same issue, this might be due to some third party libs not respecting Angular Library Format specifications and compiling their libraries with some custom webpack configurations. In my case it was @auth0/angular-jwt, I proposed a PR to fix this which isn't merged at this time (https://github.com/auth0/angular2-jwt/pull/622)

Up to you to find out which one of your deps isn't respecting the angular lib spec.

Related