我正在尝试按照本文自定义 AWS Amplify UI 登录/注册流程。每次我从中导入任何内容时都会aws-amplify-react
收到此错误:
Unable to resolve "@aws-amplify/ui/dist/style.css" from "node_modules/aws-amplify-react/dist/Amplify-UI/Amplify-UI-Components-React.js"
我已经尝试@aws-amplify/ui
专门安装,以及其他aws-amplify
版本组合。这是我的相关部分package.json
:
...
"aws-amplify": "^1.1.25",
"aws-amplify-react": "^2.3.5",
"aws-amplify-react-native": "^2.1.9",
...
以及我尝试过的特定 UI 和身份验证的版本:
"@aws-amplify/auth": "^1.2.21",
"@aws-amplify/ui": "^1.0.2",
这是导入语句:
import { ConfirmSignIn, ConfirmSignUp, ForgotPassword, RequireNewPassword, SignIn, SignUp, VerifyContact, withAuthenticator } from 'aws-amplify-react';
非常感谢任何有关解决此问题的帮助。