Im getting like 50 errors that all say that angular/core/core has no exported member \'eeFactoryDef\'.
They come from different node_modules, for example angular/cdk
I ran into this after updating some packages (including Angular from 8 to 9), then downgrading again.
The solution was to nuke the node_modules
folder and then do a fresh npm install.
I run ino the same issue when trying to upgrade to Angular 10 in another feature branch.
it messed up 'node_modules' folder.
Solution:
run npm ci
.
Delete folder node_modules
then run the npm i
command
I'm getting the same error. I'm using Angular 9.7.1, I first tried to delete the node_modules and npm install but it didn't work so I finally fixed it adding this to the tsconfig.json:
"compilerOptions":{
[...]
"paths": {
"@angular/*": ["./node_modules/@angular/*"]
}
}
Main project had Angular 8 and I got this issue when some packages with Angular 9 were installed. Use this for upgrade steps: https://update.angular.io - specifically upgrade to latest version of 8 ng update @angular/core@8 @angular/cli@8
then to 9 ng update @angular/core@9 @angular/cli@9
.
I got the issue when switching between Angular 8 and 9 multiple times as mentioned by peregrination.
Solution for me was not to delete "node_module" and run "npm install" again, but to remove and re-install npm packages to angular 8 compatible version which were mentioned in the error.
ERROR in node_modules/ngx-infinite-scroll/src/modules/infinite-scroll.directive.d.ts:27:25 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDef'.
27 static ɵfac: ɵngcc0.ɵɵFactoryDef<InfiniteScrollDirective, never>;
~~~~~~~~~~~~
node_modules/ng-click-outside/lib_commonjs/click-outside.directive.d.ts:34:25 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDef'.
34 static ɵfac: ɵngcc0.ɵɵFactoryDef<ClickOutsideDirective, never>;