-
Notifications
You must be signed in to change notification settings - Fork 299
Windows support #416
Comments
👍 |
That is a webcrypto polyfil for Node.js specifically, in the browser, node-webcrypto-ossl is not loaded as the Browser supports WebCrypto natively: See:
This is what enabled crypto to be way much faster in js-ipfs/js-ipfs-api and reduce the bundle size to almost 50% in js-ipfs-api, since we don't have to inject JS to run crypto anymore. The big issue I see, is the fact that js-ipfs-api requires more setup if you are in windows, which is unfortunate and I would expect that would be something that today people wouldn't have to deal with in Node.js. We need:
|
Thanks, now you've made it clear that the problem is Windows-only and thus I have no reason to worry about browsers. But then it's alright, I guess, because on Windows That's the right way, and thus their chances of success are high, and thus I've decided to wait (staying on the previous JS IPFS API, version 11.0.1) in a hope that they do that eventually. |
For future references: Electron is also affected, and thus there's a search for alternatives → libp2p/js-libp2p-crypto#38. |
For the record: Mithgol is on GitHub and building interplanetary Fidonet in Node.js, wow! Good to see a living legend of the Runet picking the best platform out there for his work :-) Rock on dude. |
@Mithgol this PR (merged and released) libp2p/js-libp2p-crypto#42 should have solved the issues you were getting in Electron, at least @haadcode reported that now it is working for orbit (I also tested). @dignifiedquire @victorbjelkholm you did the set up for go-ipfs to be tested on Windows, I believe. What about getting AppVeyor for js-ipfs-api? |
Part of this quarters milestone is to evaluate a CI system that works across platforms that we can use for all projects. I'll make sure to include that in the evaluation and try it out. In the meantime, if AppVeyor is the simplest way to test on windows, we should set that up. |
I've used AppVeyor before and set it up for go-ipfs. It's pretty sweet for window CI |
IPFS API has again become installable on Windows systems lacking their build tools. Having confirmed that, I am going to close this issue instantly. (I might reopen it later but only if the seemingly installed IPFS API still misbehaves for some installation-related reasons on Windows.) |
…to version 12.0.2
Thank you @Mithgol ❤️ |
Version 12.0.2 is fine and reliable so far, thanks; @dignifiedquire's idea of moving |
very happy to hear that things are working for your @Mithgol 👌 |
JS IPFS API version 11.1.0 requires
peer-id@^0.8.0
, which requireslibp2p-crypto@^0.7.0
, which requiresnode-webcrypto-ossl@^1.0.7
.(Additionally, JS IPFS API version 11.1.0 requires
peer-info@^0.8.0
, which requirespeer-id@^0.8.0
, which requireslibp2p-crypto@^0.7.0
, which requiresnode-webcrypto-ossl@^1.0.7
.)However,
node-webcrypto-ossl@^1.0.7
contains a binary addon and thus that package (and its dependents, and dependents of its dependents, and ultimately JS IPFS API version 11.1.0) cannot be installed (bynpm install ipfs-api
) on Microsoft Windows unless Microsoft Visual Studio and Python are both installed and setup beforehand (they are required fornode-gyp
to work).These requirements are introduced by the latest minor version (the previous JS IPFS API, version 11.0.1, does not contain any binary dependencies).
These requirements are somewhat huge (particularly Microsoft Visual Studio) and also sometimes their installation becomes problematic or impossible (see, for example, the list of open issues about the
windows-build-tools
npm package).Therefore these requirements should at least be mentioned on the “Releases” page (in the changelog) because otherwise users will encounter them in their consoles as a quite cryptic (and sudden) error such as the following:
(This particular error is apparently caused by having Microsoft Visual C++ 2010 Express installed without the support for the 64-bit platform where node-gyp currently requires a more recent version of build tools, made in 2015, and with the support for the 64-bit platform corresponding to the 64-bit Node.js.)
Please also consider getting rid of that dependency (
node-webcrypto-ossl@^1.0.7
) if it is possible. Having a binary addon is, most likely, preventing JS IPFS API from being browserified/webpacked and run in a web browser. I believe these browsers won't run a Node.js binary addon until a huge technological advance happens (such as a fabulous JavaScript-generating cross-compiler or a sandbox for Node.js addons in browsers).The text was updated successfully, but these errors were encountered: