-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For a documentation change (to README.md), should I still fork the repo? #1287
Comments
I have never gotten nodeJS anything to work on Windows... even doing In all honesty, this is not a problem with bitcoinjs-lib specifically. It is because we have native bindings in one of our dependencies... so any other library with similar native bindings would have the exact same problem. So the question then becomes: should every single repository contain a "How to troubleshoot Windows when it doesn't have a C++ building environment for node." when they want to include native bindings? I would say no. Also, there is a good chance that 5 years from now Windows 11 or some update breaks everything and someone on stackoverflow figures out "oh you need to run npm install --global fix-windows-bug" and then we need to add that too?... I feel like this is not appropriate to be included in the README. And the whole point for error messages (like the ones npm and node-gyp give you) is to let you know what is wrong... If it wasn't apparent to you from the error message, perhaps ask node-gyp to add more info to the error message when the person is running in a Windows environment. Perhaps they will include your suggestion. Thanks for the issue. Please close if this answer is satisfactory. |
I'll close this issue when I get some agreement that the answer is: Off topic: I went through Request for clarification: Can you provide a link to "native bindings in one of our dependencies" for anyone who would like to understand that better? Also, in case this shows anything useful regarding your "I have never gotten nodeJS anything to work on Windows," here's my console output after installing the build tools with npm and issuing
I couldn't get mocha installed properly (I kept getting "ReferenceError: describe is not defined"), so I removed the line for mocha, wrote my own "describe()" and "it()" functions and ran a local copy of https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/stealth.js. I got no errors. |
Try installing bcrypt has nothing to do with bitcoinjs-lib. The reason why it fails in the same way is because NodeJS has two types of installs.
Windows is not an OS for developers, so by default Windows has 0. You need to install everything, compilers etc. NodeJS doesn't include them in the Windows installer (why, I have no clue) so they offer some weird package via npm that you install globally to install the C++ compilers... This has nothing to do with bitcoinjs-lib specifically, and is more of an issue of "NodeJS made decisions that are hard for new NodeJS programmers to understand, node-gyp made error messages that make it sound like the library is at fault (us), and you had a lack of understanding (which is fine)..." Which is why I think that adding this to the README is excessive... as we would need to update the README every time NodeJS, npm, Microsoft, etc. decides to break something... Not to be flippant or anything... but I highly recommend developing node apps in Linux. Using a VM like VirtualBox is actually not that bad. |
This |
The change I propose to make is to the line saying to
npm install bitcoinjs-lib
which generated errors for me. I resolved these errors bynpm install -g node-gyp
and reading through GYP docs, which explained that I needed tonpm install --global --production windows-build-tools
as well.I would simply add a line after the instruction to
npm install bitcoinjs-lib
that says "This may require that you have node-gyp installed. On Windows, you may also have to install windows-build-tools as described in the documentation for node-gyp (at https://github.com/nodejs/node-gyp/blob/master/README.md).The text was updated successfully, but these errors were encountered: