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.

Ng 8.0 + ivy + library Error : does not have 'ngModuleDef' property

See original GitHub issue

🐞 bug report

Is this a regression?

no

Description

this is a simple test ng 8.0 + ivy + library. is it ivy supported custom library ? this is the error message i get : Error: Type MyLibModule does not have ‘ngModuleDef’ property. if i turn off ivy, all work fine

🔬 Minimal Reproduction

https://github.com/keatkeat87/angular-ivy-library-issue

step : ng new library-and-project-issue --enable-ivy cd library-and-project-issue ng g library my-lib ng build my-lib

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { MyLibModule } from 'my-lib'; // add

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    MyLibModule  // add
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

ng serve --open

Angular Version: Angular CLI: 8.0.0 Node: 12.3.1 OS: win32 x64 Angular: …

Package Version

@angular-devkit/architect 0.800.0 @angular-devkit/core 8.0.0 @angular-devkit/schematics 8.0.0 @schematics/angular 8.0.0 @schematics/update 0.800.0 rxjs 6.4.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
alan-agius4commented, May 31, 2019

Hi @keatkeat87, yes this is something in the roadmap to add ngcc processing on workspace libraries. We are targeting this for 8.1

Thanks

0reactions
angular-automatic-lock-bot[bot]commented, Sep 9, 2019

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angular - How to fix Error: Type FroalaEditorModule does not ...
I'm getting and error when I run the application: Error: Type FroalaEditorModule does not have 'ngModuleDef' property. How do I fix that ...
Read more >
angular/angular-cli - Gitter
Hi all, I have the following issue: ERROR: Unknown version 67 of android after ... appear that the ngModuleDef property in my library...
Read more >
Asynchronous Modules and Components in Angular Ivy
Ivy also has the ability to load modules asynchronously due to the fact that modules are no longer compiled into separate NgModuleDefinition and...
Read more >
Creating libraries - Angular
Avoid using a name that is prefixed with ng- , such as ng-library . ... To make your solution reusable, you need to...
Read more >
Angular CLI: "Module not found: Error: Can't resolve..."
The problem. After upgrading one of my Angular applications, from version 5 to version 6, I tried to build it (using ng build...
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