对此,我尝试从命令行安装 aws amplify,但它不断向我抛出错误消息:我尝试了 sudo,尝试了安全路径但无济于事。我是节点新手,不了解依赖关系等,并且不确定我做错了什么!
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: graphql@14.7.0
npm ERR! node_modules/@aws-amplify/cli/node_modules/graphql
npm ERR! graphql@"^14.5.8" from @aws-amplify/amplify-category-api@1.1.10
npm ERR! node_modules/@aws-amplify/cli/node_modules/@aws-amplify/amplify-category-api
npm ERR! @aws-amplify/amplify-category-api@"1.1.10" from @aws-amplify/cli@7.6.8
npm ERR! node_modules/@aws-amplify/cli
npm ERR! @aws-amplify/cli@"*" from the root project
npm ERR! @aws-amplify/amplify-category-api@"1.1.10" from amplify-container-hosting@2.4.10
npm ERR! node_modules/@aws-amplify/cli/node_modules/amplify-container-hosting
npm ERR! amplify-container-hosting@"2.4.10" from @aws-amplify/cli@7.6.8
npm ERR! node_modules/@aws-amplify/cli
npm ERR! @aws-amplify/cli@"*" from the root project
npm ERR! graphql@"^14.5.8" from @aws-amplify/graphql-auth-transformer@0.5.7
npm ERR! node_modules/@aws-amplify/cli/node_modules/@aws-amplify/graphql-auth-transformer
npm …Run Code Online (Sandbox Code Playgroud) 我已经用 python 创建了一个 lambda,现在我尝试使用“amplify push”将其推送到云端。
最初我遇到了两个错误,但我通过安装 pipelinev 解决了一个错误。第二个错误是:
You must have virtualenv installed and available on your PATH as "venv". It can be installed by running "pip3 install venv".
Run Code Online (Sandbox Code Playgroud)
但是当我尝试运行该命令时,我得到:
ERROR: Could not find a version that satisfies the requirement venv (from versions: none)
ERROR: No matching distribution found for venv
Run Code Online (Sandbox Code Playgroud)
据我所知,我已经安装了 virtualenv,因为我可以运行“ py -m venv”
如何将它作为 venv 添加到我的路径中?我尝试通过在 Powershell 中创建一个函数来做到这一点,但在运行“amplify push”时它不起作用
DynamoDB 有两种定价模式:预置容量模式和按需容量。
\nAmplify 始终以预配置容量模式创建表。\是否有一个选项可以默认使用按需容量创建表?
\nC:\\user\\samadhan\\ampplify_project>amplify add storage\n? Select from one of the below mentioned services: NoSQL Database\n\nWelcome to the NoSQL DynamoDB database wizard\nThis wizard asks you a series of questions to help determine how to set up your NoSQL database table.\n\n\xe2\x88\x9a Provide a friendly name \xc2\xb7 DynamoDB\n\xe2\x88\x9a Provide table name \xc2\xb7 AuthorazationsTable\n\nYou can now add columns to the table.\n\n\xe2\x88\x9a What would you like to name this column \xc2\xb7 id\n\xe2\x88\x9a Choose the data type \xc2\xb7 string\n\xe2\x88\x9a Would …Run Code Online (Sandbox Code Playgroud) 我正在尝试通过 Amplify SDK 将 Pinpoint Analytics 实施到现有的 React Native 应用程序中。我们现有的用户群拥有自己的 authN 和 authZ 实现,因此我们不需要(更重要的是,负担不起)Cognito 用户池。
一方面,Pinpoint API 在记录事件时不需要与 Cognito 进行任何集成,但是amplify 文档auth在使用时似乎需要插件analytics,并且auth在配置 Amplify 时需要一个参数。
Amplify.configure({
// To get the AWS Credentials, you need to configure
// the Auth module with your Cognito Federated Identity Pool
Auth: {
identityPoolId: 'us-east-1:xxx-xxx-xxx-xxx-xxx',
region: 'us-east-1'
},
Analytics: {
// OPTIONAL - disable Analytics if true
disabled: false,
...
Run Code Online (Sandbox Code Playgroud)
有没有办法analytics通过 Amplify使用而不生成用户池?我试过检查 AWS 移动开发工具包,但它们显然已被弃用,现在大多数文档都指向 Amplify。我们可以直接使用 Pinpoint …
我无法找到有关如何使用 Angular 将现有用户池与 amplify 关联的信息。目前,当我点击“使用 Google登录”按钮时,出现以下错误:
CMDamplify configure没有提供有关 .config 文件的选项。所以我不确定如何建立这种关系来消除该错误。我已经这样做了amplify init并且成功完成了。
如何连接到用户池?
我很感激任何帮助!
当我点击登录组件中的 Google 登录按钮时,发生错误:
登录.组件.ts
async signInWithGoogle(): Promise < void > {
const socialResult =
await this.authService.socialSignIn(AuthService.GOOGLE);
console.log('google Result:', socialResult);
}
Run Code Online (Sandbox Code Playgroud)
auth.service.ts
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { Subject } from 'rxjs';
import { Amplify } from 'aws-amplify';
import { Observable } from 'rxjs';
import { BehaviorSubject } from 'rxjs';
import {
CognitoUserPool,
CognitoUserAttribute, …Run Code Online (Sandbox Code Playgroud) amazon-web-services amazon-cognito angular aws-amplify aws-amplify-cli
我已将放大版本从 升级4.45.0到5.2.0,
现在,当我这样做时amplify push,我收到以下错误:
Following resources failed
Resource Name: ci5lt23eofhvxlc3an7db4d7veGraphQLSchema (AWS::AppSync::GraphQLSchema)
Event Type: update
Reason: The specified key does not exist. (Service: Amazon S3; Status Code: 404; Error Code: NoSuchKey; Request ID: GZQF1T9HWCCED75H; S3 Extended Request ID: qicfcwF2YUNdqMDU3EUkt+hsXIQawcirDG7TIX+peEEkAWOE1v9ee6n2L5Qc2I8uePyAXg2eJ4U=; Proxy: null)
Run Code Online (Sandbox Code Playgroud) 我们有AWS Amplify项目,启用了 CI/CD,并为我的后端启用了AppSync作为 API。CI/CD 工作正常,直到AppSync应用程序的API_KEY未过期,现在它已过期并且管道失败。我已尝试手动更新API_KEY过期时间,但管道仍然失败。有描述的解决方案可以手动整理或升级 Amplify CLI版本,但在我的情况下似乎没有这两个选项。
\n我们还有第三种选择吗?
\n以下是来自构建管道的日志。
\n2021-09-20T08:26:55.643Z [INFO]: UPDATE_IN_PROGRESS amplify-smsservice-test-115827-apiSmsTest-QXTZ5RMZXWPI AWS::CloudFormation::Stack Mon Sep 20 2021 08:26:55 GMT+0000 (Coordinated Universal Time) User Initiated\n2021-09-20T08:27:05.585Z [INFO]: \n2021-09-20T08:27:05.588Z [INFO]: UPDATE_IN_PROGRESS GraphQLSchema AWS::AppSync::GraphQLSchema Mon Sep 20 2021 08:27:01 GMT+0000 (Coordinated Universal Time)\n UPDATE_IN_PROGRESS GraphQLAPIKey AWS::AppSync::ApiKey Mon Sep 20 2021 08:27:01 GMT+0000 (Coordinated Universal Time)\n UPDATE_FAILED GraphQLAPIKey AWS::AppSync::ApiKey Mon Sep 20 2021 08:27:03 GMT+0000 (Coordinated Universal Time) API …Run Code Online (Sandbox Code Playgroud) 我正在尝试构建一个网络应用程序,并刚刚使用npm install -g @aws-amplify/cli以下响应安装了 amplify cli:
添加了 26 个包,并在 19 秒内审核了 27 个包
7个套餐正在寻求资金运行npm fund详情
但是当我运行任何放大命令时,它没有给我任何响应,没有错误代码。只是转到新线路。
我正在尝试在放大上部署我的反应应用程序。我正在使用存储、身份验证和 GraphQL API。但是我在推送代码时收到此错误。构建失败。
在本地主机上运行时,一切都按预期工作。
2023-05-20T09:21:17.184Z [INFO]: # Cloning repository: git@github.com:zyz/xyz
2023-05-20T09:21:19.101Z [INFO]:
2023-05-20T09:21:19.103Z [INFO]: Cloning into 'zeeepy'...
2023-05-20T09:21:19.104Z [INFO]: # Switching to commit: bd45c7afa30c9e71643a0e0a2991d0fc8440c7aa
2023-05-20T09:21:19.124Z [INFO]: Note: switching to 'bd45c7afa30c9e71643a0e0a2991d0fc8440c7aa'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, …Run Code Online (Sandbox Code Playgroud) 我正在使用amplify制作一个反应本机应用程序。
\n\n后端由 aws lambda、api 网关、使用 Amplify-cli 的 dynamodb 组成。
\n\n所以我有这样的放大目录。
\n\n\xe3\x84\xb4amplify\n \xe3\x84\xb4.config\n \xe3\x84\xb4#current-cloud-backend\n \xe3\x84\xb4backend\n \xe3\x84\xb4api\n \xe3\x84\xb4function\n \xe3\x84\xb4storage\n \xe3\x84\xb4awscloudformation\nRun Code Online (Sandbox Code Playgroud)\n\n我写了这样的前端代码。
\n\n import Amplify, {API} from 'aws-amplify'; \n\n resources = {\n body: params\n }\n try{\n const data = await API.get({apiName}, {path}, resources);\n if(success != null) alert(success);\n console.log('data: ', data);\n return data;\n }catch(err){\n if(fail != null) alert(fail);\n console.log('error: ', err);\n }\nRun Code Online (Sandbox Code Playgroud)\n\n操作起来非常好,
\n\n但是,虽然这不是确认的代码,但我必须做放大推送来测试它们
\n\n我想在推送它们之前测试本地代码(在放大/后端)。
\n\n你有什么解决办法吗?
\naws-amplify ×10
aws-amplify-cli ×10
aws-appsync ×2
angular ×1
aws-pinpoint ×1
github ×1
node.js ×1
npm ×1
python ×1
python-3.x ×1
virtualenv ×1