question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

yarn command doesn't work on Windows 10: Here's a fix.

See original GitHub issue

Yarn 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:

  1. 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.
  2. Once finished, close your non-elevated terminal (if you have it open already) and re-open it.
  3. 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:open
  • Created 6 years ago
  • Reactions:6
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
kraudmorcommented, Aug 2, 2018

Little update to twwilliams comment on 3 Nov 2017 for Window 10 x64 users. This steps helped me to avoid sqlite3 build:

  1. Remove sqlite3 dependency from package.json.
  2. Run yarn install.
  3. Run 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.

2reactions
mike-northcommented, Dec 6, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found