Help installing web3modal-vue3

I’m a bit confusing installing web3modal-vue3 can you help me?

I did the first 2 steps in my new vue project:

   npm install --save web3modal-vue3
   npm install --save @walletconnect/web3-provider

Then in step 3 I have two blocks code and my troubles start:

  1. Where do I have to copy the second block?
  2. in block one I see an import import { web3Modal } from "./config/mixins"but this file doesn’t exist…

Can you help to move on?

Thanks a lot!

You have to install a provider for the plugin to use. You can see they’ve done it in their example. Look for these lines:

import WalletConnectProvider from "@walletconnect/web3-provider"

providerOptions: {
  walletconnect: {
    package: WalletConnectProvider,
    options: {
      infuraId: "-"
    }
  }
},

Have a look at their example project. It seems to have the missing files you’re looking for.

That said, I’d be hesitant to use this plugin as a dependency (unless maybe for a learning project). If you intend to use this in production, I’d be more inclined to take the concepts I need from it and build my own solution (or fork it I suppose) to avoid having a stale/abandoned dependency.

1 Like

Thanks James, your post is very helpful.

I can’t install the example (too many errors due to old versions into the package.js) but I can study it. Il’'keep it updated this post with my progress.

Many thanks again for your time :slight_smile: