avmaisak / ngx-simple-icons

Angular module for SimpleIcons.org - Over 2000 Free SVG icons for popular brands.
https://simpleicons.org
5 stars 0 forks source link

Error : export 'NgxSimpleIconsComponent' was not found in 'ngx-simple-icons' #7

Closed PolSpock closed 2 years ago

PolSpock commented 2 years ago

Hello,

I'm trying to use ngx-simple-icons for angular but i'm not able to launch a project without error :( Here my errors :

./src/app/app.component.ts:11:22-48 - Error: export 'NgxSimpleIconsComponent' (imported as 'i1') was not found in 'ngx-simple-icons' (module has no exports)

./src/app/app.module.ts:12:12-37 - Error: export 'NgxSimpleIconsModule' (imported as 'NgxSimpleIconsModule') was not found in 'ngx-simple-icons' (module has no exports)

./src/app/app.module.ts:12:40-50 - Error: export 'activision' (imported as 'activision') was not found in 'ngx-simple-icons' (module has no exports)

./src/app/app.module.ts:12:52-59 - Error: export 'adobexd' (imported as 'adobexd') was not found in 'ngx-simple-icons' (module has no exports)

./src/app/app.module.ts:14:156-179 - Error: export 'NgxSimpleIconsModule' (imported as 'i1') was not found in 'ngx-simple-icons' (module has no exports)

See my demarch to reproduce the error :

First of all, my angular version :

ng --version

     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / △ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/

Angular CLI: 13.2.5
Node: 16.13.2
Package Manager: npm 8.1.2
OS: win32 x64

Angular: 13.2.4
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1302.5
@angular-devkit/build-angular   13.2.5
@angular-devkit/core            13.2.5
@angular-devkit/schematics      13.2.5
@angular/cli                    13.2.5
@schematics/angular             13.2.5
rxjs                            7.5.4
typescript                      4.5.5

1) Create a clear and new angular project this ng new mytestproject

2) Like README.MD asking, install the package with : npm i ngx-simple-icons --save

3) Then in app.module.ts file, add :

import { 
  NgxSimpleIconsModule, 
  activision,
  adobexd,
} from 'ngx-simple-icons';

and NgxSimpleIconsModule.pick({ activision, adobexd })

So the app.module.ts look like this :

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { 
  NgxSimpleIconsModule, 
  activision,
  adobexd,
} from 'ngx-simple-icons';
import { AppComponent } from './app.component';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgxSimpleIconsModule.pick({ activision, adobexd })
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

4) Finally try to start your project (with npm start for example) and you will get the same error as me

Can you help me ? I've missed something ?

Regards

avmaisak commented 2 years ago

@PolSpock thank you for issue. Just wait few moments, i will see what's the problem

pekempy commented 2 years ago

I have the same issue. I also noticed the following:

public-api.d.ts had an error on export * from './lib/types'; which I fixed by changing ./lib/types to code from this repo rather than what npm installed

First line being: export type IconName = 'icon_1001tracklists' |

instead of export declare type IconName =

I'm guessing the module needs updating

I'm still getting the Error: export 'NgxSimpleIconsModule' (imported as 'NgxSimpleIconsModule') was not found in 'ngx-simple-icons' (module has no exports) though

avmaisak commented 2 years ago

@PolSpock , @pekempy . Guys. I will fix it as soon as possible.

avmaisak commented 2 years ago

@PolSpock , @pekempy. Sorry for long answer. The problem, probably, has been fixed, PLease, checkout latest version!

avmaisak commented 2 years ago

demo project updated and works fine. https://github.com/avmaisak/ngx-simple-icons/tree/develop/ngx-simple-icons-demo/src

PolSpock commented 2 years ago

It work ! Thanks :)