npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use

  Uncategorised

I am trying to install parcel-bundler using yarn and npm.
my yarn version is : 1.22.11
npm version is : 7.20.2
windows10 : 19043.1110

I run into :

npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 2.7.15 found at "C:Usershypo.windows-build-toolspython27python.exe"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS msvs_version was set from command line or npm config
npm ERR! gyp ERR! find VS - looking for Visual Studio version 2015
npm ERR! gyp ERR! find VS VCINSTALLDIR not set, not running in VS Command Prompt
npm ERR! gyp ERR! find VS checking VS2017 (15.9.28307.1585) found at:
npm ERR! gyp ERR! find VS "C:Program Files (x86)Microsoft Visual Studio17Community"
npm ERR! gyp ERR! find VS - found "Visual Studio C++ core features"
npm ERR! gyp ERR! find VS - found VC++ toolset: v141
npm ERR! gyp ERR! find VS - found Windows SDK: 10.0.17763.0
npm ERR! gyp ERR! find VS - msvs_version does not match this version
npm ERR! gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
npm ERR! gyp ERR! find VS looking for Visual Studio 2015
npm ERR! gyp ERR! find VS - not found
npm ERR! gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS valid versions for msvs_version:
npm ERR! gyp ERR! find VS - "2017"
npm ERR! gyp ERR! find VS - "C:Program Files (x86)Microsoft Visual Studio17Community"
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS You need to install the latest version of Visual Studio
npm ERR! gyp ERR! find VS including the "Desktop development with C++" workload.
npm ERR! gyp ERR! find VS For more information consult the documentation at:
npm ERR! gyp ERR! find VS https://github.com/nodejs/node-gyp#on-windows
npm ERR! gyp ERR! find VS **************************************************************
npm ERR! gyp ERR! find VS
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack Error: Could not find any Visual Studio installation to use
npm ERR! gyp ERR! stack     at VisualStudioFinder.fail (C:UsershypoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:121:47)
npm ERR! gyp ERR! stack     at C:UsershypoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:74:16
npm ERR! gyp ERR! stack     at VisualStudioFinder.findVisualStudio2013 (C:UsershypoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:351:14)
npm ERR! gyp ERR! stack     at C:UsershypoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:70:14
npm ERR! gyp ERR! stack     at C:UsershypoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibfind-visualstudio.js:372:16
npm ERR! gyp ERR! stack     at C:UsershypoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibutil.js:54:7
npm ERR! gyp ERR! stack     at C:UsershypoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gyplibutil.js:33:16
npm ERR! gyp ERR! stack     at ChildProcess.exithandler (node:child_process:404:5)
npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:394:28)
npm ERR! gyp ERR! stack     at maybeClose (node:internal/child_process:1067:16)
npm ERR! gyp ERR! System Windows_NT 10.0.19043
npm ERR! gyp ERR! command "C:Program Filesnodejsnode.exe" "C:UsershypoAppDataRoamingnpmnode_modulesnpmnode_modulesnode-gypbinnode-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:UsershypoAppDataRoamingnpmnode_modulesparcel-bundlernode_modulesdeasync
npm ERR! gyp ERR! node -v v16.5.0
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok
npm ERR! Build failed

What have I done so far?
installed visual studio installer and downloaded 2017v the following :

enter image description here

Also I downloaded visual studio 2019 with full options and the error persists.

npm install --g --production windows-build-tools

gets stuck half way through and have to stop it manually.

How can I install parcel on my machine?

Source: Visual Studio Questions

LEAVE A COMMENT