Closed francesco-gaglione closed 1 year ago
Hey @francesco-gaglione , could you specify your npm version too? I tried reproducing this locally with npm v10.2.3 and node 21.1.0 and was able to set it up without getting the error you mentioned
For context: I'm using create-wc-dapp
v1.16.0 with react + wagmi + npm (create-wc-dapp@latest)
Could you recheck on your end as well with these configs ^^
For additional context: selecting yarn as package manager deletes package-lock.json from here during the install step.
npm version is 9.6.3
in all cases the problem is not a specific version. I continued to investigate and it occurs randomly. We have some projects where only pnpm works, other projects where only yarn works. In still others (all those where there is a next.js frontend with ssr) no package manager works and randomly after several installs it starts working without changing any dependencies. My suspicion is that there is some problem with peerDependencies being misinterpreted and installed incorrectly.
At the moment, doesn't seem like theres enough information to debug this properly
What information can be useful for analyzing the problem?
Link to minimal reproducible example
create-wc-dapp
Summary
Hi all, I used create-wc-dapp to reproduce the issue, and there with a blank new project created with create-wc-dapp the issue persist. I created a react project (not next). The issue is the classic no wagmi config found into the
createWeb3Modal()
imported from@web3modal/wagmi/react
.After hours and hours spent trying to understand what the problem was, just to try I used yarn and magically everything started working. At that point I also started trying other package managers and I tried pnpm and bun and with these the error reappears.
The result is that it only work with yarn, and it is a bit confusing since in a previous issue on the web3modal v2 opened by me one of the dev (I think) said that yarn was not well supported. Now on v3 only yarn works. Can you please check it? And in case of solution can you say how to solve it?
Note: in title I placed vite-react-ts because the same issue is on a different project based on vite-react-ts, but it dosn't matter since I replicated the issue with create-wc-dapp using react template
List of related npm package versions
node version: 20.5.1 bun version: 1.0.7 pnpm version: 8.6.12 yarn version: 1.22.19