Not compatible with Ivy (experimental)
See original GitHub issueIssue 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
.
- Install new project of Angular 8 using
ng new
- Add
@agm/core
and set up the default importimports: [ BrowserModule, AgmCoreModule.forRoot({ apiKey: environment.mapsApiKey, }) ]
- Enable Ivy in
tsconfig.app.json
:{ ... "angularCompilerOptions": { "enableIvy": true } }
- Enable AOT in
angular.json
to work around “lazy routes not found”:{ "projects": { "my-project": { "architect": { "build": { "options": { ... "aot": true, } } } } } }
- 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:
- Created 4 years ago
- Reactions:14
- Comments:54 (4 by maintainers)
Top GitHub Comments
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.
Any updates on this issue?