'node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'
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 CLI: 10.1.7
Node: 14.14.0
OS: linux x64
Solution 1:[1]
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.
Solution 2:[2]
My issue get resolved by adding stable version of ng2-material-dropdown
into my package.json as below :
After adding this try again npm install
and it's working fine.
Solution 3:[3]
Getting same error for ng-recaptcha I fixed same problem by adding to tsconfig.json
"compilerOptions": {
...
"paths": { "@angular/*": ["./node_modules/@angular/*"] }
}
https://github.com/angular/angular/issues/35291#issuecomment-598118244
Solution 4:[4]
Could be that there's an issue in your node_modules folder. Try running npm ci
Solution 5:[5]
Running ng update
to move to Angular 11 might also fix this.
Solution 6:[6]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Devang Patel |
Solution 2 | Rakhi |
Solution 3 | Akram Hossain |
Solution 4 | dopoto |
Solution 5 | dopoto |
Solution 6 | Anup Singh |