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.
- Install new project of Angular 8 using
ng new
- Add
@agm/core and set up the default import
imports: [
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 angular/angular#28603 which states that if the package.json does not contain a types or typings property, the module will be excluded from compilation.
Issue description
When compiling with Ivy, the compilation fails with the following error:
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.ng new@agm/coreand set up the default importtsconfig.app.json:angular.jsonto work around "lazy routes not found":ng serveCurrent behavior
Compile fails with error:
(Position 1 in the
importsarray is theAgmCoreModule.forRoot())Expected/desired behavior
No compiler failures
angular2 & angular-google-maps version
Other information
Compile works when Ivy is disabled.
May be related to angular/angular#28603 which states that if the
package.jsondoes not contain atypesortypingsproperty, the module will be excluded from compilation.