-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Installation Problem: Both install methods for Windows are broken #626
Comments
Not a fix, but you can do |
So after posting this I saw there is an "Alternatives" section for installs. There is an But that doesn't matter anyways, because it doesn't work either: |
The Chocolatey package is still awaiting approval by the Chocolatey team, installing via Chocolatey won't work until it's approved. @TheJaredWilcurt - The installer checks for Node.js by looking for
The npm package is a fallback; it's not supposed to be the primary means of installing Yarn. The Windows installer is what we recommend on Windows. Are you on npm v2 or npm v3 (run |
In Windows it is fairly common to use 'nodist' to keep node.js updated and be able to switch between Node.JS versions. Here the Yarn install also failed for same reason. Couldn't locate Node.JS, but I have Node.JS installed version 6.7.0. BUT again, it was installed by nodist [ https://github.com/marcelklehr/nodist ] |
@Daniel15 - Just a heads up: you may get alot of issues from users of nvm for windows, specifically if there are problems with 32 vs 64 bit yarn installations. In an effort to reduce the massive footprint multiple node installations can have on Windows (especially with older versions of node module dependency trees), NVM4W dynamically swaps the bitness through a simple file rename. For example, running /nvm-install-root
- 6.0.0
- node_modules
- node.exe By default, NVM4W will download the appropriate bitness based on either the user-defined preference or the native bitness of the operating system. So, a 32-bit version of Windows will download a 32-bit version of node. Things get more complicated on 64-bit systems because the user has a choice. By default, the 64-bit version of node would be installed... but users can also install the 32-bit version ( This is accomplished by renaming the executable file on the fly. It's not the best approach, but it was the only thing I had time to do that would work on older versions of Windows. In other words, if the user adds a 32-bit version of node in addition to the 64-bit, the file structure will look like: /nvm-install-root
- 6.0.0
- node_modules
- node.exe
- node32.exe In this state, the 64-bit version is active. If the user issues /nvm-install-root
- 6.0.0
- node_modules
- node64.exe
- node.exe So, the potential problem here is the Just thought you should know. |
Good catch, I didn't realise people used nvm or nodist. I guess these apps don't correctly update the registry to signify that Node.js is installed. Sounds like I should just remove the Node version check for now. People that don't have Node.js will get an error when they try to run Yarn, but I guess that's better than not being able to install it even though you do have a version of Node.js. I'll remove it and post an updated MSI. |
It doesn't handle systems such as nvm or nodemon that install Node.js without updating the registry. References yarnpkg#626
It doesn't handle systems such as nvm or nodemon that install Node.js without updating the registry. References #626
I uploaded a new Yarn MSI file that does not perform the Node.js version check. You should be able to install and use it as long as Thanks for reporting this! |
It doesn't handle systems such as nvm or nodemon that install Node.js without updating the registry. References #626
@Daniel15 - Actually, there is no "official" way to identify a node installation, so there is no "correct" way to signify an installation. Using the registry key as the determining factor of whether node is installed is not reliable. The community needs reliable standards so projects like yarn/version managers/etc can interoperate. This problem also occurs in Linux/macOS environments as well, which is why tools like nvm (for *nix) have problems when users cherry-pick a version of node to run (node in a shell wrapper). For the last few years, I've been pushing the TSC to set some sort of standard. I strongly encourage you to get involved in some of the TSC discussions around the subject of standards, specifically around installations. The more noise we can create, the more likely the TSC is to address the issue. Now happens to be a very good time to get involved... because there has been discussion of adopting both nvm projects into the Node foundation. |
@coreybutler What is the TSC? Sorry, I'm not very familiar with the Node.js ecosystem, and Google search for TSC just returned me stuff about TypeScript 😛 |
Which operating system are you using:
Win 7 Pro 64
Please describe the steps you took when trying to install Yarn and what went wrong:
If you are requiring that I have Node installed.... and Node comes with NPM.... why can't I just do
npm install -g yarn
. Which would actually work. Unlike your other installation methods which are broken.I use nvm-windows, so my node installation isn't in the same location as the default install. But that doesn't matter, all you have to do is run
node -v
and check to see what returns from my global PATH, as that's all that matters.The text was updated successfully, but these errors were encountered: