Yarn add web3uikit error

➤ YN0001: │ Error: wp5-cra-polyfill@github:oscario2/wp5-cra-polyfill#91431fa: Couldn’t resolve “91431fa” as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash

I just don’t know why my “yarn add web3uikit” report an error like this, plz help me

What other dependencies other than CRA is in your existing project? You can post your package.json.

thank you, this is my package.json

{
“name”: “new-moralis-nextjs-yarn”,
“version”: “0.1.0”,
“private”: true,
“scripts”: {
“dev”: “next dev”,
“build”: “next build”,
“start”: “next start”,
“lint”: “next lint”
},
“dependencies”: {
“daisyui”: “^2.15.3”,
“moralis”: “^1.8.0”,
“next”: “12.1.6”,
“react”: “18.1.0”,
“react-dom”: “18.1.0”,
“react-icons”: “^4.4.0”,
“react-moralis”: “^1.4.0”,
“react-scroll”: “^1.8.7”,
“web3”: “^1.7.3”
},
“devDependencies”: {
“autoprefixer”: “^10.4.7”,
“eslint”: “8.17.0”,
“eslint-config-next”: “12.1.6”,
“postcss”: “^8.4.14”,
“tailwindcss”: “^3.1.2”
}
}

That looks fine, I’m not sure what has happened. It may be easier to try with a new project starting with React/moralis/react-moralis/web3uikit and if that works, then migrate the rest of your code/dependencies over.

I had the same issue and solved it by switching to classic version of yarn (yarn version 1). I think some packages are not tested with yarn version >= 2. You can use classic version of yarn by running yarn set version classic. Make sure that after running this command yarn --version should print a version which starts with 1. not 2. or 3.

1 Like