rainbow-me / rainbowkit

The best way to connect a wallet 🌈 🧰
https://rainbowkit.com
MIT License
2.39k stars 632 forks source link

[bug] Install / npm Init causes bluescreen on Win11 and reboot. Reproducible #1855

Closed ewebgh33 closed 5 months ago

ewebgh33 commented 5 months ago

Is there an existing issue for this?

RainbowKit Version

2.02 (latest)

wagmi Version

Not sure if it got that far

Current Behavior

npm init @rainbow-me/rainbowkit@latest Somewhere in the process Win11 bluescreens and reboots. Every time. I've done it 5 times now trying to identify and isolate the issue, and I can't. Node v21.1.0 NPM 10.5.0 Win11 Terminal or vscode, same behaviour

Expected Behavior

It should progress up to 100% and have installed the files. What I don't understand is, npm init and installing Rainbowkit, is just pulling files from the web and setting up a directory structure. What could possibly be causing the bluescreen??

Steps To Reproduce

Literally open a terminal and paste in npm init @rainbow-me/rainbowkit@latest Then wait until it's somewhere between 25% and 50% I think??

Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)

No response

Anything else?

No response

ewebgh33 commented 5 months ago

Tried to go a version back eg npm init @rainbow-me/rainbowkit@2.0.1

Aaaaand npm ERR! notarget No matching version found for @rainbow-me/create-rainbowkit@2.0.1

But... that's a version? I'm looking at it here in github. Trying to narrow down this issue. I just want to connect a wallet, not bluescreen my PC repeatedly. I've been using other stuff just fine. Smart contract development? OK here. VScode with plugins? All OK. Python code and web scraping? A-OK.

Rainbowkit? BLUESCREEN

ewebgh33 commented 5 months ago

Tried yarn instead Got this

error Command failed.
Exit code: 1
Command: C:\Users\COMPUTERNAME\AppData\Local\Yarn\bin\create-rainbowkit

Which oddly enough, is the same thing that happened the first time I tried npm init with rainbowkit. When that same error (or the npm version of it) cropped up, I googled it, and a couple of pages said to update npm to solve it. So I did.

Anyway, here we are with the same/equivalent error on Yarn. Also, for yarn info:

yarn info v1.22.21
error Couldn't find a package.json file in "C:\\BlockDev\\dev_rainbowkit"

Please advise.

ewebgh33 commented 5 months ago

Well npm run dev spins up a working page and I can click/connect wallet on localhost... but sheesh. Does it have to have so many issues just getting to this point? Doesn't fill me with confidence here.

magiziz commented 5 months ago

@ewebgh33 I have windows 11 and when i run npm init @rainbow-me/rainbowkit@latest it works fine with no bluescreen. Can you try downgrading your node version maybe ? And also not try using npm and yarn at the same time since it might mess up the lock files.

When running npm init @rainbow-me/rainbowkit@latest we setup a project and install all dependencies. I think since you said it happens at around 25% and 50% it might be that your PC can't handle the amount of CPU we're using when installing all the needed dependencies.

In this case please setup a project from scratch with react and follow these steps in our installation guide here: https://www.rainbowkit.com/docs/installation#manual-setup

ewebgh33 commented 5 months ago

@magiziz first time I've been told my CPU can't handle an npm install! I highly doubt, this thing is used for 3D animation rendering, it's not a 10yo laptop.

Also as I mentioned, the yarn install works. Same dependencies, same everything, right? If it's due to "volume" why would yarn work and npm not, when it's simply pulling codebase from the web and copying to an SSD.

Yes to not using npm and yarn at the same time, but as I mentioned I was trying to narrow down the issue...

I can look at downgrading but apparently I need to install nvm-windows to do this, as I can't simply run the LTS installer (it says newer already installed, then exits).

Manual install is a workaround, I'd like to get to the bottom of why the npm init for Rainbowkit fails reproducibly when nothing else I've ever done with code, in yarn, conda, or npm, has ever had that effect in past years / machines / anything.

ewebgh33 commented 5 months ago

@magiziz Downgraded to Node v20.11.1. Same issue. NPM is the same version still though, NPM 10.5.0.

So both 20.11.1 (LTS) and v21.1.0 (latest) node bluescreen every single time, on npm init for Rainbowkit.

Folder size when I reboot is around 500mb, with close to 100k files. Do we really need 500mb and 100,000 files of code to deploy a wallet connect?

ewebgh33 commented 5 months ago

I am SO tired of every app wanting a new package manager So I resisted install pnpm, because I already have conda, pip, yarn, npm, and I am sure a few others.

But pnpm installed flawlessly.

Maybe you are right, and the way npm tries to force-feed 500mb and 100,000 files of who-knows-what, is what is causing the issue. Maybe yarn and pnpm install in a more calm way? They are more chill? They aren't hangry? I don't know.

Anyway thanks

ewebgh33 commented 5 months ago

What's with "closed/completed", the error is unresolved. pnpm works but you have issues with your particular package and npm. I can npm other packages just fine.