Skip to content

NG2011 compile error: non-standalone components in imports array (dspace theme) #5469

@RenteriaMX

Description

@RenteriaMX

Describe the bug

In branch dspace-9_x, the file src/themes/dspace/eager-theme.module.ts
spreads DECLARATIONS into the imports array of the @NgModule decorator.
These components are not standalone, causing Angular NG2011 compile errors
that prevent the application from building.

Affected components:

  • HeaderComponent
  • HeaderNavbarWrapperComponent
  • HomeNewsComponent
  • NavbarComponent

DSpace version: 9.x (dspace-angular 9.3.0-next)

To Reproduce

  1. Clone the repo and checkout branch dspace-9_x
  2. Run npm run start:dev
  3. Build fails with NG2011 errors

Expected behavior

The app should compile successfully. The DECLARATIONS array should be in
declarations: [...DECLARATIONS], not in imports: [...DECLARATIONS].

Related work

Fix: move ...DECLARATIONS from imports to declarations in the
@NgModule decorator in src/themes/dspace/eager-theme.module.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcannot reproduceUnable to reproduce at this time, so the ticket either needs more information or needs closing

    Type

    No type

    Projects

    Status

    ✅ Done / Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions