Ошибка AWS Amplify «В хранилище не найден подключаемый модуль для провайдера»

Мое приложение 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.:

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

person Ajit Goel    schedule 03.07.2020    source источник


Ответы (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. 
person Ajit Goel    schedule 03.07.2020