Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
charmbv opened this issue Apr 17, 2024 · 10 comments
Labels
bug Something isn't working

Comments

@charmbv
Copy link

charmbv commented Apr 17, 2024

🐞 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 charmbv added the bug Something isn't working label Apr 17, 2024
Copy link

👋 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.

@udayvunnam
Copy link
Owner

@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 {}

@charmbv
Copy link
Author

charmbv commented Apr 18, 2024

@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.

@TomislavMedved
Copy link

Any update on this?

@Aman-Ansari-03
Copy link

@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.

@charmbv
Copy link
Author

charmbv commented May 2, 2024

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

@klekovkinda
Copy link

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

@diep1989
Copy link

Any update?

@JakeAi
Copy link

JakeAi commented Jun 7, 2024

Instead of

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

Use

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

@bahnhub
Copy link

bahnhub commented Jun 27, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants