yarn command doesn't work on Windows 10: Here's a fix.
See original GitHub issueYarn fails with an MSBuild error: MSB4132. It is looking for v2.0 of the build tools but only v4.0 is found.
To solve this problem, you need to do a couple of things:
- Install node’s windows-build-tools:
npm install -g windows-build-tools
. You will need to do this from an elevated prompt. Some Microsoft documentation on the issue says to do it from an elevated PowerShell prompt. This will take a while, so be patient. - Once finished, close your non-elevated terminal (if you have it open already) and re-open it.
- From your normal user terminal (doesn’t need to be admin), set the msvs_version config setting with
yarn config set msvs_version 2015
. The npm command above sets it for npm but yarn needs it as well.
Once I did these things, I was able to complete the yarn
command, run npm start
successfully, and then see the Frontend Grocer site at http://localhost:3000/
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Git Bash Command on Windows, yarn command not found
Open a new terminal. Click "Terminal" → "New Terminal". or. Simply use ctrl + shift + ` (backtick) · Once the Terminal is...
Read more >Fix Unable to Run Yarn in Windows Terminal - PowerShell
To fix it, open PowerShell as administrator, again make sure to run this in PowerShell, not with the regular command prompt (cmd).
Read more >4 Methods for How to Install Yarn on Windows Server
Once the Chocolatey installation completes, install the Yarn package on the Windows server by running the following command. ... Here is the ...
Read more >Installation | Yarn - Package Manager
Installation · Install Corepack · Updating the global Yarn version · Initializing your project · Updating to the latest versions · Installing the...
Read more >'yarn global add' command does not work on Windows
'yarn global add' command does not work on Windows · Step 1 - Get the yarn global binary path · Step 2 -...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Little update to twwilliams comment on 3 Nov 2017 for Window 10 x64 users. This steps helped me to avoid sqlite3 build:
sqlite3
dependency frompackage.json
.yarn install
.yarn add sqlite3
.Now you should be able to run
npm start
. If you still having issues don’t forget to try node-gyp installation instructions on Windows.Nice catch! My windows 10 must have had all of this stuff already installed. I’ll think about how to integrate this with the CLI so developers don’t have to spend time tracking this down.