1

I have my project that I want to deploy to Vercel but when I'm trying to deploy it I got error

Failed to compile.
./node_modules/@wagmi/core/dist/esm/actions/getProof.js
Attempted import error: 'getProof' is not exported from 'viem/actions' (imported as 'viem_getProof').
Attempted import error: 'withRetry' is not exported from 'viem' (imported as 'withRetry').
Attempted import error: 'withTimeout' is not exported from 'viem' (imported as 'withTimeout').
Attempted import error: 'withRetry' is not exported from 'viem' (imported as 'withRetry').
Attempted import error: 'withTimeout' is not exported from 'viem' (imported as 'withTimeout').
Error: Command "npm run build" exited with 1

Here is my package.json:

{
  "name": "site",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@emotion/react": "^11.11.3",
    "@emotion/styled": "^11.11.0",
    "@headlessui/react": "^1.7.17",
    "@web3modal/ethers": "^3.4.0",
    "@web3modal/wagmi": "^3.4.0",
    "ethers": "^5.7.2",
    "framer-motion": "^10.16.16",
    "next": "14.0.4",
    "react": "^18",
    "react-dom": "^18",
    "react-icons": "^4.12.0",
    "react-transition-group": "^4.4.5",
    "viem": "^1.19.13",
    "wagmi": "^2.5.5",
    "web3": "^4.4.0"
  },
  "devDependencies": {
    "autoprefixer": "^10.0.1",
    "postcss": "^8",
    "tailwindcss": "^3.3.0"
  }
}

Maybe decision in Vercel environment but I don't know what to do enter image description here

1 Answer 1

0

It's likely a compatibility issue.

You can try upgrading to a newer Viem version to see if the build problem resolves on its own.

Ideally, the viem and wagmi versions should match in order to avoid edge cases and confusions, in any case, viem should be at least >=0.2.0. (https://github.com/wevm/wagmi/blob/3baed905e25b8136ce9abe6a2a90eddfaee56a84/package.json#L55)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.