我有一个 aws-amplify v.1.2.4 并且可以正常使用
(ns app.core
["aws-amplify" :default Amplify]
["aws-amplify" :refer [Auth]])
(js/console.log Amplify) 是一个模块 (js/console.log Auth) 并且是一个 AuthClass
但是在将 aws-amplify 升级到 v.3.3.4 后,我无法使其工作
这两个值现在都不可用。
我尝试的是:
["@aws-amplify/core" :as amplify-core]
["@aws-amplify/auth" :as amplify-auth]
但它没有按预期工作。
amplify-core/Amplify 现在是AmplifyClass,但其中几乎所有内容都是null。也许这是一个问题?我可以打电话给
(.configure amplify-core/Amplify awsAmplifyConfig)
它似乎工作正常。
但
(console.log amplify-auth) => {__esModule: true}
我不能用它做任何事情。有没有办法获得实际的 Auth 类?
此外,控制台中还有一堆警告。似乎 shadow-cljs 无法加载某些模块: 控制台屏幕
shadow-cljs - failed to load module$node_modules$http2$lib$protocol$index
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$http2$lib$http @ http.js:138
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$http2$lib$index @ index.js:19
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$node_http_handler$dist$cjs$node_http2_handler @ node-http2-handler.js:8
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$node_http_handler$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$runtimeConfig @ runtimeConfig.js:12
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$CognitoIdentityClient @ CognitoIdentityClient.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$index @ index.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity @ fromCognitoIdentity.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$http2$lib$http
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$http2$lib$index @ index.js:19
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$node_http_handler$dist$cjs$node_http2_handler @ node-http2-handler.js:8
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$node_http_handler$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$runtimeConfig @ runtimeConfig.js:12
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$CognitoIdentityClient @ CognitoIdentityClient.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$index @ index.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity @ fromCognitoIdentity.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$http2$lib$index
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_sdk$node_http_handler$dist$cjs$node_http2_handler @ node-http2-handler.js:8
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$node_http_handler$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$runtimeConfig @ runtimeConfig.js:12
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$CognitoIdentityClient @ CognitoIdentityClient.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$index @ index.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity @ fromCognitoIdentity.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_sdk$node_http_handler$dist$cjs$node_http2_handler
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_sdk$node_http_handler$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$runtimeConfig @ runtimeConfig.js:12
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$CognitoIdentityClient @ CognitoIdentityClient.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$index @ index.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity @ fromCognitoIdentity.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_sdk$node_http_handler$dist$cjs$index
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$runtimeConfig @ runtimeConfig.js:12
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$CognitoIdentityClient @ CognitoIdentityClient.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$index @ index.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity @ fromCognitoIdentity.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$runtimeConfig
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$CognitoIdentityClient @ CognitoIdentityClient.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$index @ index.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity @ fromCognitoIdentity.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$CognitoIdentityClient
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$index @ index.js:5
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity @ fromCognitoIdentity.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_sdk$client_cognito_identity$dist$cjs$index
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity @ fromCognitoIdentity.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$fromCognitoIdentity
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index @ index.js:6
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_sdk$credential_provider_cognito_identity$dist$cjs$index
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_amplify$core$lib$Credentials @ Credentials.js:58
shadow.js.jsRequire @ js.js:66
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_amplify$core$lib$Credentials
shadow.js.jsRequire @ js.js:74
shadow$provide.module$node_modules$$aws_amplify$core$lib$index @ index.js:42
shadow.js.jsRequire @ js.js:66
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
js.js:74 shadow-cljs - failed to load module$node_modules$$aws_amplify$core$lib$index
shadow.js.jsRequire @ js.js:74
shadow.js.require @ js.js:100
eval @ app.core.js:5
goog.globalEval @ main.js:836
env.evalLoad @ main.js:2224
(anonymous) @ main.js:3822
main.js:2226 failed to load app.core.js Module not provided: ./framer
有任何想法吗?