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

No suitable injection token for parameter 'iconRegistry' of class 'MatSelectCountryModule'. no type or decorator #24

Closed
Tbiniimene opened this issue Jul 16, 2020 · 10 comments
Assignees

Comments

@Tbiniimene
Copy link

Tbiniimene commented Jul 16, 2020

ERROR in Failed to compile entry-point
@angular-material-extensions/select-country (es2015 as esm2015) due to compilation errors:
ntry (es2015 as esm2015) due to compilation errors:
node_modules/@angular-material-extensions/select-country/fesm2015/angular-material-extensions-select-country.js:1354:17 - error NG2003: No suitable injection token for parameter 'iconRegistry' of class 'MatSelectCountryModule'.
no type or decorator

1354 constructor(iconRegistry, sanitizer) {
~~~~~~~~~~~~

@Sahil624
Copy link

+1

@AnthonyNahas
Copy link
Member

which lib version are you using ?

@AnthonyNahas AnthonyNahas self-assigned this Jul 17, 2020
@AnthonyNahas AnthonyNahas added the need investigation unclear ticket label Jul 17, 2020
@Tbiniimene
Copy link
Author

Angular CLI: 9.1.11
Node: 12.18.2
OS: win32 x64

Angular: 9.1.12
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.901.11
@angular-devkit/build-angular 0.901.11
@angular-devkit/build-optimizer 0.901.11
@angular-devkit/build-webpack 0.901.11
@angular-devkit/core 9.1.11
@angular-devkit/schematics 9.1.11
@angular/cdk 10.0.2
@angular/cli 9.1.11
@angular/flex-layout 9.0.0-beta.31
@angular/material 10.0.2
@ngtools/webpack 9.1.11
@schematics/angular 9.1.11
@schematics/update 0.901.11
rxjs 6.5.5
typescript 3.8.3
webpack

@ronelpanag
Copy link

I have the same problem, I installed the library using the both installation ways

ERROR in Failed to compile entry-point @angular-material-extensions/select-country (es2015 as esm2015) due to compilation errors:
node_modules/@angular-material-extensions/select-country/fesm2015/angular-material-extensions-select-country.js

@abdelnorBousmina
Copy link

same problem since version 1.2.1

@impimediavillage
Copy link

impimediavillage commented Aug 18, 2020

Hi, Thanks for the amazing module above. I have upgraded angular cli and material to 10.0.10 , also have updated

Have this error : No suitable injection token for parameter 'iconRegistry' of
class 'MatSelectCountryModule'. no type or decorator - please stick on this and app not running, any guiding help well appreciated.

@impimediavillage
Copy link

NEW ERROR AFTER UPGRADE THIS MODULE TO LATEST VERSION ON ANGULAR 10.
Cannot read property 'addSvgIcon' of undefined
at MatSelectCountryModule.registerCountries

MY DEV ENVIRONMENT IS :
Angular Version =
@angular-devkit/architect 0.1000.6
@angular-devkit/build-angular 0.1000.6
@angular-devkit/build-optimizer 0.1000.6
@angular-devkit/build-webpack 0.1000.6
@angular-devkit/core 10.0.6
@angular-devkit/schematics 10.0.6
@angular/cdk 10.1.3
@angular/cli 10.0.6
@angular/flex-layout 10.0.0-beta.32
@angular/material 10.1.3
@ngtools/webpack 10.0.6
@schematics/angular 10.0.6
@schematics/update 0.1000.6
rxjs 6.5.5
typescript 3.9.7
webpack 4.43.0

Node Version :
v12.18.3

// package,json below :

"name": "",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular-material-extensions/select-country": "^1.3.0",
"@angular/animations": "^10.0.10",
"@angular/cdk": "^10.1.3",
"@angular/common": "^10.0.10",
"@angular/compiler": "^10.0.10",
"@angular/core": "^10.0.10",
"@angular/flex-layout": "^10.0.0-beta.32",
"@angular/forms": "^10.0.10",
"@angular/material": "^10.0.0-rc.3",
"@angular/platform-browser": "^10.0.10",
"@angular/platform-browser-dynamic": "^10.0.10",
"@angular/router": "^10.0.10",
"@material/icon-button": "^4.0.0",
"@ngu/carousel": "^1.5.5",
"@types/snapsvg": "^0.5.0",
"get-svg-colors": "^1.5.1",
"jw-angular-pagination": "^1.2.0",
"ng-inline-svg": "^9.2.2",
"ng-starrating": "^1.0.20",
"ng2-search-filter": "^0.5.1",
"ngx-pagination": "^5.0.0",
"rxjs": "~6.5.5",
"snapsvg": "^0.5.1",
"svg-country-flags": "^1.2.7",
"tslib": "^1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.1000.6",
"@angular/cli": "^10.0.6",
"@angular/compiler-cli": "^10.0.10",
"@angular/language-service": "^10.0.10",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "^12.12.54",
"codelyzer": "^5.1.2",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.1.1",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.5.4",
"protractor": "~7.0.0",
"ts-node": "~7.0.0",
"tslint": "^6.1.3",
"typescript": "^3.9.7"
}
}

angular.json below :

 "assets": [
          "src/favicon.ico",
          "src/assets",
          {
            "glob": "**/*",
            "input": "node_modules/svg-country-flags/svg",
            "output": "assets/svg-country-flags/svg"
          }
        ],
        "styles": [
          "./node_module

@AnthonyNahas
Copy link
Member

Finally solved in v.1.3.1

thanks for contributing 🍻

@AnthonyNahas AnthonyNahas removed the need investigation unclear ticket label Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants
@abdelnorBousmina @impimediavillage @AnthonyNahas @Sahil624 @ronelpanag @Tbiniimene and others