为什么@angular/core/core 没有导出成员 'ɵɵFactoryDeclaration'。构建项目时抛出错误?
Why is @angular/core/core has no exported member 'ɵɵFactoryDeclaration'. error thrown when build the project?
我有全局 Angular CLI 版本 (13.0.1),项目中的本地版本是 (10.2.3)。
一切都很好,我对某些组件做了一些更改 (我没有触及 package.json),当我 运行 我的管道(bitbucket 管道)时,我得到在构建步骤中出现此错误:
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 '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
45 static ɵfac: i0.ɵɵFactoryDeclaration<NgxFileDragDropComponent, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop/ngx-file-drag-drop.component.d.ts:46:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.
46 static ɵcmp: i0.ɵɵComponentDeclaration<NgxFileDragDropComponent, "ngx-file-drag-drop", never, { "disabled": "disabled"; "multiple": "multiple"; "displayFileSize": "displayFileSize"; "borderColor": "activeBorderColor"; "accept": "accept"; "emptyPlaceholder": "emptyPlaceholder"; }, { "valueChanged": "valueChanged"; }, never, never>;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:7:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
7 static ɵfac: i0.ɵɵFactoryDeclaration<BytePipe, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:8:22 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵPipeDeclaration'.
8 static ɵpipe: i0.ɵɵPipeDeclaration<BytePipe, "byte">;
~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:9:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
9 static ɵfac: i0.ɵɵFactoryDeclaration<NgxFileDragDropModule, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:10:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
10 static ɵmod: i0.ɵɵNgModuleDeclaration<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]>;
~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:11:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
11 static ɵinj: i0.ɵɵInjectorDeclaration<NgxFileDragDropModule>;
~~~~~~~~~~~~~~~~~~~~~
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
当我 运行 我的项目时,我在本地重现了这个错误,但它仍然存在!尽管我删除了节点模块,package-lock.json。当我切换到分支时问题仍然没有包含新的更改并且我删除了节点模块,包-lock.json.
错误:
+ npm run build
> client@1.0.1 build /opt/atlassian/pipelines/agent/build/new-client
> 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 '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
45 static ɵfac: i0.ɵɵFactoryDeclaration<NgxFileDragDropComponent, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop/ngx-file-drag-drop.component.d.ts:46:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.
46 static ɵcmp: i0.ɵɵComponentDeclaration<NgxFileDragDropComponent, "ngx-file-drag-drop", never, { "disabled": "disabled"; "multiple": "multiple"; "displayFileSize": "displayFileSize"; "borderColor": "activeBorderColor"; "accept": "accept"; "emptyPlaceholder": "emptyPlaceholder"; }, { "valueChanged": "valueChanged"; }, never, never>;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:7:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
7 static ɵfac: i0.ɵɵFactoryDeclaration<BytePipe, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:8:22 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵPipeDeclaration'.
8 static ɵpipe: i0.ɵɵPipeDeclaration<BytePipe, "byte">;
~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:9:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
9 static ɵfac: i0.ɵɵFactoryDeclaration<NgxFileDragDropModule, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:10:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
10 static ɵmod: i0.ɵɵNgModuleDeclaration<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]>;
~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:11:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
11 static ɵinj: i0.ɵɵInjectorDeclaration<NgxFileDragDropModule>;
~~~~~~~~~~~~~~~~~~~~~
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
解决方案是从 ngx-drag-drop
库中删除 ^
字符 package.json,因为我有 "ngx-file-drag-drop": "^5.1.0"
所以安装的版本不是 5.1.3
5.1.0
。要获得有关角色 ^
的更多信息,请参阅 What's the difference between tilde(~) and caret(^) in package.json?
我有全局 Angular CLI 版本 (13.0.1),项目中的本地版本是 (10.2.3)。 一切都很好,我对某些组件做了一些更改 (我没有触及 package.json),当我 运行 我的管道(bitbucket 管道)时,我得到在构建步骤中出现此错误:
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 '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
45 static ɵfac: i0.ɵɵFactoryDeclaration<NgxFileDragDropComponent, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop/ngx-file-drag-drop.component.d.ts:46:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.
46 static ɵcmp: i0.ɵɵComponentDeclaration<NgxFileDragDropComponent, "ngx-file-drag-drop", never, { "disabled": "disabled"; "multiple": "multiple"; "displayFileSize": "displayFileSize"; "borderColor": "activeBorderColor"; "accept": "accept"; "emptyPlaceholder": "emptyPlaceholder"; }, { "valueChanged": "valueChanged"; }, never, never>;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:7:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
7 static ɵfac: i0.ɵɵFactoryDeclaration<BytePipe, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:8:22 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵPipeDeclaration'.
8 static ɵpipe: i0.ɵɵPipeDeclaration<BytePipe, "byte">;
~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:9:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
9 static ɵfac: i0.ɵɵFactoryDeclaration<NgxFileDragDropModule, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:10:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
10 static ɵmod: i0.ɵɵNgModuleDeclaration<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]>;
~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:11:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
11 static ɵinj: i0.ɵɵInjectorDeclaration<NgxFileDragDropModule>;
~~~~~~~~~~~~~~~~~~~~~
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
当我 运行 我的项目时,我在本地重现了这个错误,但它仍然存在!尽管我删除了节点模块,package-lock.json。当我切换到分支时问题仍然没有包含新的更改并且我删除了节点模块,包-lock.json.
错误:
+ npm run build
> client@1.0.1 build /opt/atlassian/pipelines/agent/build/new-client
> 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 '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
45 static ɵfac: i0.ɵɵFactoryDeclaration<NgxFileDragDropComponent, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop/ngx-file-drag-drop.component.d.ts:46:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.
46 static ɵcmp: i0.ɵɵComponentDeclaration<NgxFileDragDropComponent, "ngx-file-drag-drop", never, { "disabled": "disabled"; "multiple": "multiple"; "displayFileSize": "displayFileSize"; "borderColor": "activeBorderColor"; "accept": "accept"; "emptyPlaceholder": "emptyPlaceholder"; }, { "valueChanged": "valueChanged"; }, never, never>;
~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:7:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
7 static ɵfac: i0.ɵɵFactoryDeclaration<BytePipe, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:8:22 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵPipeDeclaration'.
8 static ɵpipe: i0.ɵɵPipeDeclaration<BytePipe, "byte">;
~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:9:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.
9 static ɵfac: i0.ɵɵFactoryDeclaration<NgxFileDragDropModule, never>;
~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:10:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.
10 static ɵmod: i0.ɵɵNgModuleDeclaration<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]>;
~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-file-drag-drop/lib/ngx-file-drag-drop.module.d.ts:11:21 - error TS2694: Namespace '"/opt/atlassian/pipelines/agent/build/new-client/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.
11 static ɵinj: i0.ɵɵInjectorDeclaration<NgxFileDragDropModule>;
~~~~~~~~~~~~~~~~~~~~~
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
解决方案是从 ngx-drag-drop
库中删除 ^
字符 package.json,因为我有 "ngx-file-drag-drop": "^5.1.0"
所以安装的版本不是 5.1.3
5.1.0
。要获得有关角色 ^
的更多信息,请参阅 What's the difference between tilde(~) and caret(^) in package.json?