It looks like the errors you’re seeing are due to version mismatches or incorrect imports in your project. Specifically, the modules like ./walletConnect and ./connectors/walletConnectLegacy seem to be missing in the installed versions of @wagmi/connectors and @wagmi/core.
Here’s how you can resolve this:
Check your package versions: The imports you are trying to use (@wagmi/connectors/walletConnect, etc.) might not exist in [email protected]. These paths and connectors have changed between versions. Make sure all your wagmi-related packages (@wagmi/core, @wagmi/connectors, @web3modal/ethereum) are compatible and ideally at the same major version.
Update your dependencies: Run:
yarn add wagmi@latest @wagmi/core @wagmi/connectors @web3modal/ethereum
or specify versions that are compatible with each other.
import { WalletConnectConnector } from '@wagmi/core/connectors/walletConnect';
But in newer versions, the import path or package structure might have changed.
Check the official wagmi and web3modal docs: Confirm the correct import paths and usage for your version:
Clear cache and reinstall: Sometimes Vite’s dependency pre-bundling cache causes issues. Try:
rm -rf node_modules/.vite yarn install yarn vite --force
If after this you still face issues, consider sharing your package.json dependencies and relevant import code so we can diagnose further.
Key points