小编mun*_*nir的帖子

为什么@angular/core/core没有导出成员“??FactoryDe​​claration”。构建项目时抛出错误?

我有我的全局 Angular CLI 版本(13.0.1),项目中的本地版本是(10.2.3)。\n一切都很好,我对一些组件做了一些更改(我没有触及 package.json)并且当我运行管道(bitbucket 管道)时,我在构建步骤中遇到此错误:

\n
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 '\xc9\xb5\xc9\xb5FactoryDeclaration'.\n45     static \xc9\xb5fac: i0.\xc9\xb5\xc9\xb5FactoryDeclaration<NgxFileDragDropComponent, never>;\n                       ~~~~~~~~~~~~~~~~~~~~\nnode_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 '\xc9\xb5\xc9\xb5ComponentDeclaration'.\n46     static \xc9\xb5cmp: i0.\xc9\xb5\xc9\xb5ComponentDeclaration<NgxFileDragDropComponent, "ngx-file-drag-drop", never, { "disabled": "disabled"; "multiple": "multiple"; "displayFileSize": "displayFileSize"; "borderColor": "activeBorderColor"; "accept": "accept"; "emptyPlaceholder": "emptyPlaceholder"; }, { "valueChanged": "valueChanged"; }, never, never>;\n                       ~~~~~~~~~~~~~~~~~~~~~~\nnode_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 '\xc9\xb5\xc9\xb5FactoryDeclaration'.\n7     static \xc9\xb5fac: i0.\xc9\xb5\xc9\xb5FactoryDeclaration<BytePipe, never>;\n                      ~~~~~~~~~~~~~~~~~~~~\nnode_modules/ngx-file-drag-drop/lib/byte.pipe.d.ts:8:22 - error …
Run Code Online (Sandbox Code Playgroud)

bitbucket node.js npm typescript angular

7
推荐指数
1
解决办法
3万
查看次数

如何将 AWS Amplify Appsync 默认授权模式从 API KEY 更改为 cognito 用户池?

我正在使用Amplify,我将身份验证添加到我的应用程序中,我的 graphQL 架构具有私有规则,所有事情在我的本地都运行良好,每个 graphQl api 调用,它包含访问令牌和 appSync 接受我的请求。但是当我部署我的应用程序时,我收到一个错误,因为我的所有 graphQl 请求仍然使用api-key而不是访问令牌。

我的模式.graphQl 在此输入图像描述

我的 AWSAppSyncClient 在此输入图像描述

在控制台中我使用此配置在此输入图像描述

在我的本地:身份验证后一切正常。

在此输入图像描述

在生产中: graphQl 在身份验证后仍然具有 api-key

在此输入图像描述

amazon-cognito graphql aws-appsync aws-amplify

2
推荐指数
1
解决办法
1920
查看次数