I don’t know if the question sounds dumb, but it is really troublesome. I was born in China and I am still in China, I am in the Mainland, so I am behind the notorious not-so-great Great Firewall, cut off from the rest of the world and can’t access Wikipedia, Quora, Google, DeviantArt, Facebook… if I don’t know the tricks of editing hosts, cmd commands and ShadowSocksR. I have literally no money, so I can’t subscribe a VPN service, and most of them are useless in China.
Anyways, because I am behind the “Great Firewall”, and GitHub is using s3.amazonaws.com network, downloading anything from Github is ridiculously slow, and almost impossible to complete, and they always fail with network error.
I am connected to the Internet via 100Mbps optical fiber cable broadband (of course I know it’s actually 11.920928955078125MBps, and no it is not 12.5MBps like many people wrongly suggested, and my max download speed is consistent with my calculation), download speed from GitHub never exceed 300KBps, usually it’s 80KBps at most, and always end up with 0KBps and fails - if I don’t know necessary tricks. I have installed Git and Github Desktop, but as I wrote, they are completely useless.
My OS is Windows 10 v1909 x64, I have installed Strawberry Perl, MSYS2, Python 3.8.2, Ruby, Node.js et cetera, all of them have extensive resource networks, but downloading anything from these default mirrors is utterly impractical, fortunately they all have mirrors hosted by universities in this backland, so I changed the default setting files, and I have successfully installed many modules.
I have run npm i -D electron@latest to install electron via npm, because I have changed the settings so downloading from npm is fast, but the real archive file is not at all downloaded, seriously downloading electron-v9.0.0-win32-x64.zip is postinstall process? Without that file of course I can’t use electron. Downloading that file is unimaginably slow, literally 0KB/s, after little logical reasoning I have deducted that the file must be on Github, fortunately I have found the same file on fossies, and it gave me the original url, proves my deduction. I have downloaded the file from fossies, which is super fast with a 32 threads multi-thread downloader, download was successful, I have run electron.exe but I can’t do anything with it, and I have learned from electronjs.org I have to use it with either npm or yarn, I have node.js, but again I can’t install electron with npm, I have run npm i -D electron@latest again and use resmon to monitor hard disk writing, and I have found the folder in %userprofile%\appdata\local\temp, I have replaced the 0KB electron-v9.0.0-win32-x64.zip with the full one, but it is still downloading and it literally isn’t going anywhere in all of eternity, I have opened install.js file with notepad++, but couldn’t find the url to replace it, so I am out of wits and can’t use electron, how to use npm to install the local file?