Gbuomprisco / ng2-material-dropdown

Angular 2 Material-like Dropdown Component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR in Namespace Angular 9

jadir-junior opened this issue · comments

After the last update on 12/02/2021 my angular 9 is broken

after the package is 1.0.0, the package I think ng-chips that used ng2-material-dropdown start show a error namespace

ERROR in node_modules/ng2-material-dropdown/src/modules/components/button/ng2-dropdown-button.d.ts:18:21 - error TS2694: Namespace '"/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

18     static ɵfac: i0.ɵɵFactoryDeclaration<Ng2DropdownButton, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/ng2-material-dropdown/src/modules/components/button/ng2-dropdown-button.d.ts:19:21 - error TS2694: Namespace '"/app/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.

19     static ɵcmp: i0.ɵɵComponentDeclaration<Ng2DropdownButton, "ng2-dropdown-button", never, { "showCaret": "showCaret"; }, { "onMenuToggled": "onMenuToggled"; }, never, ["*"]>;
                       ~~~~~~~~~~~~~~~~~~~~~~
node_modules/ng2-material-dropdown/src/modules/components/dropdown/ng2-dropdown.d.ts:38:21 - error TS2694: Namespace '"/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

38     static ɵfac: i0.ɵɵFactoryDeclaration<Ng2Dropdown, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/ng2-material-dropdown/src/modules/components/dropdown/ng2-dropdown.d.ts:39:21 - error TS2694: Namespace '"/app/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.

39     static ɵcmp: i0.ɵɵComponentDeclaration<Ng2Dropdown, "ng2-dropdown", never, { "dynamicUpdate": "dynamicUpdate"; }, { "onItemClicked": "onItemClicked"; "onItemSelected": "onItemSelected"; "onShow": "onShow"; "onHide": "onHide"; }, ["button", "menu"], ["ng2-dropdown-button", "ng2-dropdown-menu"]>;
                       ~~~~~~~~~~~~~~~~~~~~~~
node_modules/ng2-material-dropdown/src/modules/components/menu-item/ng2-menu-item.d.ts:38:21 - error TS2694: Namespace '"/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

38     static ɵfac: i0.ɵɵFactoryDeclaration<Ng2MenuItem, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/ng2-material-dropdown/src/modules/components/menu-item/ng2-menu-item.d.ts:39:21 - error TS2694: Namespace '"/app/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.

39     static ɵcmp: i0.ɵɵComponentDeclaration<Ng2MenuItem, "ng2-menu-item", never, { "preventClose": "preventClose"; "value": "value"; }, {}, never, ["*"]>;
                       ~~~~~~~~~~~~~~~~~~~~~~
node_modules/ng2-material-dropdown/src/modules/components/menu/ng2-dropdown-menu.d.ts:74:21 - error TS2694: Namespace '"/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

74     static ɵfac: i0.ɵɵFactoryDeclaration<Ng2DropdownMenu, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/ng2-material-dropdown/src/modules/components/menu/ng2-dropdown-menu.d.ts:75:21 - error TS2694: Namespace '"/app/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.

75     static ɵcmp: i0.ɵɵComponentDeclaration<Ng2DropdownMenu, "ng2-dropdown-menu", never, { "width": "width"; "focusFirstElement": "focusFirstElement"; "offset": "offset"; "appendToBody": "appendToBody"; "zIndex": "zIndex"; }, {}, ["items"], ["*"]>;

When a change the package to 0.11.0 this solved, but I think some components show broken in another place.

We do have similar problem, please fix this ASAP.

@KiranRachumalla

Around noon GMT today (2-DEC-2021), ng2-material-dropdown moved to version 1.0. This new version breaks my code, and this is the only dependency.

Workaround: changing my code's package-lock.json's dependcies. ng2-material-dropdown to {"version": "0.11.0"} and npm install --save ng2-material-dropdown@0.11.0 and doing another npm install resolves the issue optional

Thanks for your reply. This is exactly what we did as a workaround for now. We modified our package.json to have 0.11.0 version of ng2-material-dropdown as a dependency though we dont use it directly.

I hope to have proper fix soon.

@KiranRachumalla

Around noon GMT today (2-DEC-2021), ng2-material-dropdown moved to version 1.0. This new version breaks my code, and this is the only dependency.

Workaround: changing my code's package-lock.json's dependcies. ng2-material-dropdown to {"version": "0.11.0"} and npm install --save ng2-material-dropdown@0.11.0 and doing another npm install resolves the issue optional

Thanks.

@jadir-junior and @KiranRachumalla

I tried your fix (change the "ng2-material-dropdown" dependency version from 1.0.0 to 0.11.0), but it doesn't work. :/ Every time I run "npm install", the "package-lock.json" file is automaticaly overridden and the "ng2-material-dropdown" dependency version is back to 1.0.0.

I tried to upgrade my npm version to use the "overrides" functionnality (https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides) but it doesn't work.

What is your npm version ? Do you remember if you had to use the "overrides" functionnality ? Do you remember if running "npm install" was cancelling the change of the "ng2-material-dropdown" dependency version as it happens to me (apparrently no, because you clearly indicates to run "npm install" again at the end of your process) ? Do you remember if you did something else ?

Thank you