title: Why is @angular/core/core has no exported member 'ɵɵFactoryDeclaration'. error thrown when build the project?
body: <p>I have my global Angular CLI version (13.0.1) and the local version in the project is (10.2.3).
  All things was good, I did some change in some components <strong>(I didn't touche package.json)</strong> and when I run my pipeline (bitbucket pipeline)  I get in the build step this error :</p>
  <pre><code>ERROR in node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop/ngx-file-drag-drop.component.d.ts:45:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵFactoryDeclaration'.
  45     static ɵfac: i0.ɵɵFactoryDeclaration&lt;NgxFileDragDropComponent, never&gt;;
                         ~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop/ngx-file-drag-drop.component.d.ts:46:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵComponentDeclaration'.
  46     static ɵcmp: i0.ɵɵComponentDeclaration&lt;NgxFileDragDropComponent, &quot;ngx-file-drag-drop&quot;, never, { &quot;disabled&quot;: &quot;disabled&quot;; &quot;multiple&quot;: &quot;multiple&quot;; &quot;displayFileSize&quot;: &quot;displayFileSize&quot;; &quot;borderColor&quot;: &quot;activeBorderColor&quot;; &quot;accept&quot;: &quot;accept&quot;; &quot;emptyPlaceholder&quot;: &quot;emptyPlaceholder&quot;; }, { &quot;valueChanged&quot;: &quot;valueChanged&quot;; }, never, never&gt;;
                         ~~~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:7:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵFactoryDeclaration'.
  7     static ɵfac: i0.ɵɵFactoryDeclaration&lt;BytePipe, never&gt;;
                        ~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:8:22 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵPipeDeclaration'.
  8     static ɵpipe: i0.ɵɵPipeDeclaration&lt;BytePipe, &quot;byte&quot;&gt;;
                         ~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:9:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵFactoryDeclaration'.
  9     static ɵfac: i0.ɵɵFactoryDeclaration&lt;NgxFileDragDropModule, never&gt;;
                        ~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:10:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵNgModuleDeclaration'.
  10     static ɵmod: i0.ɵɵNgModuleDeclaration&lt;NgxFileDragDropModule, [typeof i1.NgxFileDragDropComponent, typeof i2.BytePipe], [typeof i3.CommonModule, typeof i4.MatChipsModule, typeof i5.MatIconModule, typeof i6.MatTooltipModule], [typeof i1.NgxFileDragDropComponent, typeof i2.BytePipe]&gt;;
                         ~~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:11:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵInjectorDeclaration'.
  11     static ɵinj: i0.ɵɵInjectorDeclaration&lt;NgxFileDragDropModule&gt;;
                         ~~~~~~~~~~~~~~~~~~~~~
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! client@1.0.1 build: `ng build --prod --build-optimizer=false`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the client@1.0.1 build script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2021-12-14T17_41_21_825Z-debug.log
  
  </code></pre>
  <p>I reproducte this error locally when I run my project, but it still! despite I delete node-modules, package-lock.json. also the problem still while I switch to a branche doesn't containts the new changes and I delete node-modules, package-lock.json.</p>
  <p><strong>error :</strong></p>
  <pre><code>+ npm run build
  &gt; client@1.0.1 build /opt/atlassian/pipelines/agent/build/new-client
  &gt; ng build --prod --build-optimizer=false
  Warning: Entry point 'ngx-highlightjs' contains deep imports into '/opt/atlassian/pipelines/agent/build/new-client/node_modules/highlight.js/lib/highlight.js'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
  Compiling @angular/cdk/keycodes : es2015 as esm2015
  Compiling @angular/core : es2015 as esm2015
  Compiling @angular/animations : es2015 as esm2015
  Compiling @angular/cdk/observers : es2015 as esm2015
  Compiling @angular/animations/browser : es2015 as esm2015
  Compiling @angular/common : es2015 as esm2015
  Compiling @angular/cdk/collections : es2015 as esm2015
  Compiling @angular/cdk/platform : es2015 as esm2015
  Compiling @angular/platform-browser : es2015 as esm2015
  Compiling @angular/cdk/bidi : es2015 as esm2015
  Compiling @angular/forms : es2015 as esm2015
  Compiling @angular/cdk/a11y : es2015 as esm2015
  Compiling @angular/platform-browser/animations : es2015 as esm2015
  Compiling @angular/cdk/scrolling : es2015 as esm2015
  Compiling @angular/cdk/portal : es2015 as esm2015
  Compiling @angular/common/http : es2015 as esm2015
  Compiling @ngrx/store : es2015 as esm2015
  Compiling @angular/material/core : es2015 as esm2015
  Compiling @angular/cdk/layout : es2015 as esm2015
  Compiling @angular/router : es2015 as esm2015
  Compiling @angular/cdk/text-field : es2015 as esm2015
  Compiling @angular/cdk/overlay : es2015 as esm2015
  Compiling @angular/cdk/table : es2015 as esm2015
  Compiling @angular/material/form-field : es2015 as esm2015
  Compiling @angular/material/button : es2015 as esm2015
  Compiling @angular/material/tooltip : es2015 as esm2015
  Compiling @angular/material/dialog : es2015 as esm2015
  Compiling @angular/material/select : es2015 as esm2015
  Compiling @angular/material/input : es2015 as esm2015
  Compiling @angular/material/sort : es2015 as esm2015
  Compiling @angular/platform-browser-dynamic : es2015 as esm2015
  Compiling @ngx-translate/core : es2015 as esm2015
  Compiling @angular/material/progress-spinner : es2015 as esm2015
  Compiling angular-in-memory-web-api : module as esm5
  Compiling @angular/material/paginator : es2015 as esm2015
  Compiling ngx-perfect-scrollbar : module as esm5
  Compiling ng-inline-svg : module as esm5
  Compiling ngx-permissions : es2015 as esm2015
  Compiling @ngrx/effects : es2015 as esm2015
  Compiling @ngrx/router-store : es2015 as esm2015
  Compiling @ngrx/store-devtools : es2015 as esm2015
  Compiling @angular/material/snack-bar : es2015 as esm2015
  Compiling @ngrx/entity : es2015 as esm2015
  Compiling @angular/material/progress-bar : es2015 as esm2015
  Compiling @angular/material/tabs : es2015 as esm2015
  Compiling @ng-bootstrap/ng-bootstrap : es2015 as esm2015
  Compiling @ngx-loading-bar/core : es2015 as esm2015
  Compiling @angular/material/autocomplete : es2015 as esm2015
  Compiling @angular/material/card : es2015 as esm2015
  Compiling @angular/material/checkbox : es2015 as esm2015
  Compiling @angular/material/datepicker : es2015 as esm2015
  Compiling @angular/material/icon : es2015 as esm2015
  Compiling @angular/material/menu : es2015 as esm2015
  Compiling @angular/material/radio : es2015 as esm2015
  Compiling @angular/material/table : es2015 as esm2015
  Compiling ngx-markdown : es2015 as esm2015
  Compiling ngx-captcha : es2015 as esm2015
  Compiling ngx-mask : es2015 as esm2015
  Compiling @angular/material-moment-adapter : es2015 as esm2015
  Compiling ngx-highlightjs : es2015 as esm2015
  Compiling @angular/cdk/accordion : es2015 as esm2015
  Compiling @angular/material/expansion : es2015 as esm2015
  Compiling @ng-select/ng-select : es2015 as esm2015
  Compiling ngx-spinner : es2015 as esm2015
  Compiling ngx-textarea-autosize : es2015 as esm2015
  Compiling ngx-autosize : es2015 as esm2015
  Compiling @angular/material/slide-toggle : es2015 as esm2015
  Compiling @angular/material/chips : es2015 as esm2015
  Compiling angular2-text-mask : main as commonjs
  Compiling @angular/material/divider : es2015 as esm2015
  Compiling @angular/fire : es2015 as esm2015
  Compiling @angular/fire/firestore : es2015 as esm2015
  Compiling ngx-dropzone : es2015 as esm2015
  Compiling @ngx-formly/core : es2015 as esm2015
  Compiling @ngx-formly/material/form-field : es2015 as esm2015
  Compiling @ngx-formly/material/input : es2015 as esm2015
  Compiling @ngx-formly/material/textarea : es2015 as esm2015
  Compiling @ngx-formly/core/select : es2015 as esm2015
  Compiling @ngx-formly/material/radio : es2015 as esm2015
  Compiling @ngx-formly/material/checkbox : es2015 as esm2015
  Compiling @ngx-formly/material/multicheckbox : es2015 as esm2015
  Compiling @ngx-formly/material/select : es2015 as esm2015
  Compiling @ngx-formly/material : es2015 as esm2015
  WARNING in Entry point 'angular2-text-mask' contains deep imports into '/opt/atlassian/pipelines/agent/build/new-client/node_modules/text-mask-core/dist/textMaskCore'. This is probably not a problem, but may cause the compilation of entry points to be out of order.
  ERROR in node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop/ngx-file-drag-drop.component.d.ts:45:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵFactoryDeclaration'.
  45     static ɵfac: i0.ɵɵFactoryDeclaration&lt;NgxFileDragDropComponent, never&gt;;
                         ~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop/ngx-file-drag-drop.component.d.ts:46:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵComponentDeclaration'.
  46     static ɵcmp: i0.ɵɵComponentDeclaration&lt;NgxFileDragDropComponent, &quot;ngx-file-drag-drop&quot;, never, { &quot;disabled&quot;: &quot;disabled&quot;; &quot;multiple&quot;: &quot;multiple&quot;; &quot;displayFileSize&quot;: &quot;displayFileSize&quot;; &quot;borderColor&quot;: &quot;activeBorderColor&quot;; &quot;accept&quot;: &quot;accept&quot;; &quot;emptyPlaceholder&quot;: &quot;emptyPlaceholder&quot;; }, { &quot;valueChanged&quot;: &quot;valueChanged&quot;; }, never, never&gt;;
                         ~~~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:7:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵFactoryDeclaration'.
  7     static ɵfac: i0.ɵɵFactoryDeclaration&lt;BytePipe, never&gt;;
                        ~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:8:22 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵPipeDeclaration'.
  8     static ɵpipe: i0.ɵɵPipeDeclaration&lt;BytePipe, &quot;byte&quot;&gt;;
                         ~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:9:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵFactoryDeclaration'.
  9     static ɵfac: i0.ɵɵFactoryDeclaration&lt;NgxFileDragDropModule, never&gt;;
                        ~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:10:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵNgModuleDeclaration'.
  10     static ɵmod: i0.ɵɵNgModuleDeclaration&lt;NgxFileDragDropModule, [typeof i1.NgxFileDragDropComponent, typeof i2.BytePipe], [typeof i3.CommonModule, typeof i4.MatChipsModule, typeof i5.MatIconModule, typeof i6.MatTooltipModule], [typeof i1.NgxFileDragDropComponent, typeof i2.BytePipe]&gt;;
                         ~~~~~~~~~~~~~~~~~~~~~
  node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:11:21 - error TS2694: Namespace '&quot;/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core&quot;' has no exported member 'ɵɵInjectorDeclaration'.
  11     static ɵinj: i0.ɵɵInjectorDeclaration&lt;NgxFileDragDropModule&gt;;
                         ~~~~~~~~~~~~~~~~~~~~~
  npm ERR! code ELIFECYCLE
  npm ERR! errno 1
  npm ERR! client@1.0.1 build: `ng build --prod --build-optimizer=false`
  npm ERR! Exit status 1
  npm ERR! 
  npm ERR! Failed at the client@1.0.1 build script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2021-12-14T17_41_21_825Z-debug.log
  
  </code></pre>