Skip to content

ng xi18n fails with library which uses Ivy #16395

@romko391

Description

@romko391

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • [ X ] xi18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

No

Description

When running xi18n command on my application, that imports my library i get the following error:

ERROR: Unexpected value 'SharedModule in /Users/****/Code/my-app/dist/@shared/lib/shared.module.d.ts' imported by the module 'CoreModule in /Users/****/Code/my-app/libs/my-core/src/lib/core.module.ts'. Please add a @NgModule annotation.

But this is only happening when my lib is pre-build with Ivy option set to true, otherwise everything is fine.

A clear and concise description of the problem...

🔬 Minimal Reproduction

  • ng new my-app
  • ng g lib my-lib
  • build my-lib
  • import my-lib into my-apps module
  • run ng xi18n for my-app

🔥 Exception or Error




`ERROR: Unexpected value 'SharedModule in /Users/****/Code/my-app/dist/@shared/lib/shared.module.d.ts' imported by the module 'CoreModule in /Users/****/Code/my-app/libs/my-core/src/lib/core.module.ts'. Please add a @NgModule annotation.`

🌍 Your Environment




`@angular/* version 9.0.0-rc-4 or 0.900.0-rc-4`

Anything else relevant?

Nope

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions