Ошибка AWS Amplify `В хранилище не найден плагин для поставщика`

Мое приложение AWS ampify использует хранилище. Когда я запускаю приложение, я получаю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:

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

1 ответ

Решение

Мне удалось заставить приложение работать

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. 
Другие вопросы по тегам