node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'

Viewed 36447

We are facing issue as mentioned in title. When we are doing ng build than its shows an attached SS error to us. WE have tried all possbile way as already shared in github / stackoverflow community. But still we are facing the same error. Guys, please help us to resolve this issue. We are stuck in the deployment process. Here, are my package.json

"dependencies": {
"@angular/animations": "~10.1.6",
"@angular/cdk": "^10.2.5",
"@angular/common": "~10.1.6",
"@angular/compiler": "~10.1.6",
"@angular/core": "~10.1.6",
"@angular/forms": "~10.1.6",
"@angular/material": "^10.2.5",
"@angular/platform-browser": "~10.1.6",
"@angular/platform-browser-dynamic": "~10.1.6",
"@angular/router": "~10.1.6",
"@angular/service-worker": "~10.1.6",
"@iplab/ngx-file-upload": "^3.1.1",
"angular-datatables": "10.0.0",
"angular-pipes": "^10.0.0",
"bootstrap": "^4.5.3",
"braintree-web": "^3.71.1",
"datatables.net": "^1.10.23",
"datatables.net-bs4": "^1.10.23",
"datatables.net-buttons": "^1.7.1",
"datatables.net-buttons-dt": "^1.7.1",
"jquery": "^3.5.1",
"jszip": "^3.6.0",
"laravel-echo": "^1.10.0",
"moment": "^2.29.1",
"ng-connection-service": "^1.0.4",
"ngx-bootstrap": "^6.1.0",
"ngx-chips": "^2.2.2",
"ngx-drag-scroll": "^9.0.0-beta.4",
"ngx-mask": "^11.1.4",
"ngx-pagination": "^5.0.0",
"ngx-pipes": "^2.7.5",
"ngx-select-dropdown": "1.5.0",
"popper.js": "^1.16.1",
"pusher-js": "^7.0.2",
"rxjs": "~6.6.0",
"sweetalert2": "^10.15.7",
"tslib": "^2.0.0",
"uuid": "^8.3.2",
"zone.js": "~0.10.2"

},

Angular error

Angular CLI: 10.1.7
Node: 14.14.0
OS: linux x64
8 Answers

My issue get resolved by adding stable version of ng2-material-dropdown into my package.json as below :

enter image description here

After adding this try again npm install and it's working fine.

If you see the error path then it is pointing to the node modules. This seems like an issue of the node_modules only. You need to delete the node_modules folder and install it again.

Could be that there's an issue in your node_modules folder. Try running npm ci

Check for the version compatibility. Your some modules are not compatible with angular version. You have to read the docs of modules before installing it and install the version which is accepted by angular.

Change your ng2-material-dropdown version to stable version in package.json file and Run 'npm install'.

Maybe the version is not compatible. Had the same problem then resolved the problem by updating the version of @ngx-translate/core, eg: the @angular/core is 10.0.5 , then update the @ngx-translate/core to 13.0.0versions

Running ng update to move to Angular 11 might also fix this.

Related