question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Not compatible with Ivy (experimental)

See original GitHub issue

Issue description When compiling with Ivy, the compilation fails with the following error:

ERROR in src/app/app.module.ts(8,12): error TS-991010: Value at position 1 in the NgModule.importss of AppModule is not a reference: [object Object]

Steps to reproduce and a minimal demo of the problem I could not create a stackblitz or plunker for this as it is intending to show a compiler failure and I do not know how to demonstrate this. You can check out https://github.com/paullessing/agm-ivy-demo and attempt to build after running yarn install.

  1. Install new project of Angular 8 using ng new
  2. Add @agm/core and set up the default import
    imports: [
      BrowserModule,
      AgmCoreModule.forRoot({
        apiKey: environment.mapsApiKey,
      })
    ]
    
  3. Enable Ivy in tsconfig.app.json:
    {
      ...
      "angularCompilerOptions": {
         "enableIvy": true
      }
    }
    
  4. Enable AOT in angular.json to work around “lazy routes not found”:
    {
      "projects": {
        "my-project": {
          "architect": {
            "build": {
              "options": {
                ...
                "aot": true,
              }
            }
          }
        }
      }
    }
    
  5. Run ng serve

Current behavior Compile fails with error:

ERROR in src/app/app.module.ts(8,12): error TS-991010: Value at position 1 in the NgModule.importss of AppModule is not a reference: [object Object]

(Position 1 in the imports array is the AgmCoreModule.forRoot())

Expected/desired behavior No compiler failures

angular2 & angular-google-maps version

"@agm/core": "1.0.0-beta.5",
Angular CLI: 8.0.1
Node: 10.16.0
OS: win32 x64
Angular: 8.0.0
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.800.1
@angular-devkit/build-angular     0.800.1
@angular-devkit/build-optimizer   0.800.1
@angular-devkit/build-webpack     0.800.1
@angular-devkit/core              8.0.1
@angular-devkit/schematics        8.0.1
@angular/cli                      8.0.1
@ngtools/webpack                  8.0.1
@schematics/angular               8.0.1
@schematics/update                0.800.1
rxjs                              6.4.0
typescript                        3.4.5
webpack                           4.30.0

Other information Compile works when Ivy is disabled.

May be related to https://github.com/angular/angular/issues/28603 which states that if the package.json does not contain a types or typings property, the module will be excluded from compilation.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:14
  • Comments:54 (4 by maintainers)

github_iconTop GitHub Comments

10reactions
pshurygincommented, Aug 17, 2019

I agree that this must be released ASAP. This library’s incompatibility with ivy is one of few issues left preventing us from testing ivy on our mid-scale web app.

8reactions
mruknowmecommented, Jun 26, 2019

Any updates on this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Not compatible with Ivy (experimental) · Issue #1647 - GitHub
It seems that the error comes from a librairy that is outside of node_module and made available using path-mapping . Check the following...
Read more >
How Can You (Experimentally) Try Angular Ivy, Right Now?
Bad news is, all of your (current) modules in node_modules folder is not Ivy-compatible. You need to recompile all of them.
Read more >
Angular 9 Support with Ivy in Kendo UI for Angular - Telerik
Hi,. We are currently working toward providing support for Ivy, and some of our packages are already compatible, but we will likely abstain ......
Read more >
The Angular Ivy guide for library authors - DEV Community ‍ ‍
Angular Ivy compatibility validation​​ The Angular compatibility compiler can require some changes to our libraries. If we want to verify that ...
Read more >
FAQ — Ivy 1.0 documentation
Q: Does Ivy support model deployment? A: Yes, Ivy will support efficient model deployment. However, currently this feature is not yet supported as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found