AWS Amplify“在存储中找不到提供者的插件”错误

AWS Amplify `No plugin found in Storage for the provider` error

我的 AWS amplify 应用程序使用存储。当我 运行 应用程序时,我收到 No plugin found in Storage for the provider 错误。我尝试过的一些事情是:

a. removing and adding storage module by `amplify add\remove storage` commands.
b. Manually configuring storage in main.js based on this [github issue][1]. 
c. deleting the application's node_modules and adding them again. 

我可能遗漏了什么?

main.js:

import Amplify,{Auth, Storage} from 'aws-amplify';
import '@aws-amplify/ui-vue';
import aws_exports from './aws-exports';
Amplify.configure(aws_exports);

main.js:添加代码以根据此 github issue:

手动配置存储
Amplify.configure({
    Auth: {
        identityPoolId: '<IdentityPoolId>', 
        region: "<region>", 
        userPoolId: "<userPoolId>", 
        userPoolWebClientId: "<userPoolWebClientId>", 
    },
    
    Storage: {
        AWSS3: {
            bucket: "<bucket>",
            region: "<region>",
        }
    }
});

堆栈跟踪:

Uncaught (in promise) No plugin found in Storage for the provider
(anonymous) @ 4.js:241
step @ 4.js:69
(anonymous) @ 4.js:50
(anonymous) @ 4.js:44
push../node_modules/@aws-amplify/storage/lib-esm/Storage.js.__awaiter @ 4.js:40
push../node_modules/@aws-amplify/storage/lib-esm/Storage.js.Storage.put @ 4.js:234
_loop$ @ 18.js:286
tryCatch @ vendors~app.js:455791
invoke @ vendors~app.js:456017
prototype.<computed> @ vendors~app.js:455843
tryCatch @ vendors~app.js:455791
maybeInvokeDelegate @ vendors~app.js:456080
invoke @ vendors~app.js:455991
prototype.<computed> @ vendors~app.js:455843
asyncGeneratorStep @ vendors~app.js:162870
_next @ vendors~app.js:162892
(anonymous) @ vendors~app.js:162899
F @ vendors~app.js:319219
(anonymous) @ vendors~app.js:162888
TranscribeFiles @ 18.js:392
invokeWithErrorHandling @ vendors~app.js:433345
invoker @ vendors~app.js:433670
invokeWithErrorHandling @ vendors~app.js:433345
Vue.$emit @ vendors~app.js:435374
clickButton @ vendors~app.js:444622
click @ vendors~app.js:444498
invokeWithErrorHandling @ vendors~app.js:433345
invoker @ vendors~app.js:433670
original._wrapper @ vendors~app.js:438399

我能够通过

让应用程序正常工作
a. removing the manual configuration in main.js, 
b. removing storage completely, 
c. publishing the application to aws, 
d. adding storage back again and publishing the application to aws.