xng-breadcrumb icon indicating copy to clipboard operation
xng-breadcrumb copied to clipboard

Angular 17: Module '"xng-breadcrumb"' has no exported member 'BreadcrumbModule'.

Open charmbv opened this issue 1 year ago β€’ 11 comments

🐞 Bug report

Description

Upgraded to version v11.0.0 of xng-breadcrumb and now get the following error:

Module '"xng-breadcrumb"' has no exported member 'BreadcrumbModule'.

when I try to import the module. This is with Angular v17.3.4 and not using standalone components.

Angular Version:


Angular CLI: 17.3.4
Node: 20.11.0
Package Manager: npm 10.2.4
OS: win32 x64

Angular: 17.3.4
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, material, material-luxon-adapter, platform-browser
... platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.4
@angular-devkit/build-angular   17.3.4
@angular-devkit/core            17.3.4
@angular-devkit/schematics      17.3.4
@schematics/angular             17.3.4
ng-packagr                      17.3.0
rxjs                            7.8.1
typescript                      5.3.3
zone.js                         0.14.4

charmbv avatar Apr 17 '24 13:04 charmbv

πŸ‘‹ Hey @charmbv
Thanks for flagging your first issue! We're on it! Please provide all the details you can
Got a fix? Send a PR! πŸš€ Check out our local dev guide

If you like this project, please ⭐star⭐ our repo.

github-actions[bot] avatar Apr 17 '24 13:04 github-actions[bot]

@charmbv With Angular 17+, we use standalone components.

https://udayvunnam.github.io/xng-breadcrumb/#/quickstart?id=standalone-components

Try this -

import { BreadcrumbComponent, BreadcrumbItemDirective } from 'xng-breadcrumb';

@Component({
  standalone: true,
  imports: [RouterModule, BreadcrumbComponent, BreadcrumbItemDirective],
  templateUrl: './app.component.html',
  ...
})
export class AppComponent {}

udayvunnam avatar Apr 18 '24 03:04 udayvunnam

@udayvunnam Won't work as I'm not using standalone components. This is not a requirement for using Angular 17+ so it shouldn't be a requirement for this library as well.

charmbv avatar Apr 18 '24 06:04 charmbv

Any update on this?

TomislavMedved avatar Apr 30 '24 08:04 TomislavMedved

@charmbv @TomislavMedved @charmbv Try using the lower version npm install [email protected] their might be some dependency errors but if you Confidentially find everything correct then run this command npm install [email protected] --legacy-peer-deps.

Aman-Ansari-03 avatar May 02 '24 08:05 Aman-Ansari-03

This is not a proper solution to the issue. I've been using overrides but will be looking for another solution.

charmbv avatar May 02 '24 08:05 charmbv

After migrating to Angular 17, I've encountered the same issue. This library is now requiring unexpected refactoring.

klekovkinda avatar May 28 '24 09:05 klekovkinda

Any update?

diep1989 avatar May 29 '24 19:05 diep1989

Instead of

import { BreadcrumbModule } from 'xng-breadcrumb';
@NgModule({
  imports: [
    BreadcrumbModule,
  ],

Use

import { BreadcrumbComponent, BreadcrumbItemDirective } from 'xng-breadcrumb';
@NgModule({
  imports: [
    BreadcrumbComponent, BreadcrumbItemDirective,
  ],

JakeAi avatar Jun 07 '24 12:06 JakeAi

Instead of

import { BreadcrumbModule } from 'xng-breadcrumb';
@NgModule({
  imports: [
    BreadcrumbModule,
  ],

Use

import { BreadcrumbComponent, BreadcrumbItemDirective } from 'xng-breadcrumb';
@NgModule({
  imports: [
    BreadcrumbComponent, BreadcrumbItemDirective,
  ],

The provided solution from JakeAi worked for me

bahnhub avatar Jun 27 '24 13:06 bahnhub

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Aug 27 '24 05:08 github-actions[bot]