Search code examples
aws-amplifyaws-amplify-vue

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


My AWS amplify application uses storage. When I am running the application I am getting a No plugin found in Storage for the provider error. Some of things that I have tried are:

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. 

What could I be missing?

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: Added code to manually configure storage as per this github issue:

Amplify.configure({
    Auth: {
        identityPoolId: '<IdentityPoolId>', 
        region: "<region>", 
        userPoolId: "<userPoolId>", 
        userPoolWebClientId: "<userPoolWebClientId>", 
    },
    
    Storage: {
        AWSS3: {
            bucket: "<bucket>",
            region: "<region>",
        }
    }
});

StackTrace:

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

Solution

  • I was able to get the application working by

    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.