profile
viewpoint

Ask questionsVisual Studio finder is doing a case-sensitive path check

<!-- Thank you for reporting an issue. The more information you can give us, the better the chance we can fix your problem.

This issue tracker is for issues with node-gyp, if you have an issue installing a specific module, please file an issue on that module's issue tracker (npm issues modulename). -->

  • Node Version: v12.5.0 -- npm 6.9.0
  • Platform: Windows 10
  • Compiler: Visual Studio 2017 (msbuild v15.9.13)
  • Module: node-gyp configure

The Visual Studio finder is doing a case-sensitive check on paths Those checks should probably be case insensitive.

See lines 406 and 410 of ./lib/find-visualstudio.js

406: if (this.configPath && this.configPath !== vsPath) 410: if (this.envVcInstallDir && this.envVcInstallDir !== vsPath) {

Those might better be:

406: if (this.configPath && this.configPath.toLowerCase() !== vsPath.toLowerCase()) 410: if (this.envVcInstallDir && this.envVcInstallDir.toLowerCase() !== vsPath.toLowerCase()) {

<details><summary>Verbose output (from npm or node-gyp):</summary>

C:\Users\watch\projects\edge-js>node-gyp configure --msvs_version=2017
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.2
gyp info using node@12.5.0 | win32 | ia32
gyp info find Python using Python version 2.7.16 found at "c:\python27\python2.exe"
gyp ERR! find VS
gyp ERR! find VS msvs_version was set from command line or npm config
gyp ERR! find VS - looking for Visual Studio version 2017
gyp ERR! find VS running in VS Command Prompt, installation path is:
gyp ERR! find VS "d:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise"
gyp ERR! find VS - will only use this version
gyp ERR! find VS checking VS2019 (16.1.29025.244) found at:
gyp ERR! find VS "d:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v142
gyp ERR! find VS - found Windows SDK: 10.0.17763.0
gyp ERR! find VS - msvs_version does not match this version
gyp ERR! find VS checking VS2017 (15.9.28307.718) found at:
gyp ERR! find VS "D:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise"
gyp ERR! find VS - found "Visual Studio C++ core features"
gyp ERR! find VS - found VC++ toolset: v141
gyp ERR! find VS - found Windows SDK: 10.0.17763.0
gyp ERR! find VS - does not match this Visual Studio Command Prompt
gyp ERR! find VS could not find a version of Visual Studio 2017 or newer to use
gyp ERR! find VS looking for Visual Studio 2015
gyp ERR! find VS - found in "D:\Program Files (x86)\Microsoft Visual Studio 14.0"
gyp ERR! find VS - MSBuild in "C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe"
gyp ERR! find VS - msvs_version does not match this version
gyp ERR! find VS not looking for VS2013 as it is only supported up to Node.js 8
gyp ERR! find VS msvs_version does not match this VS Command Prompt or the
gyp ERR! find VS installation cannot be used.
gyp ERR! find VS

</details>

<!-- Any further details -->

nodejs/node-gyp

Answer questions bzoz

cc @refack

useful!

Related questions

Error: `gyp` failed with exit code: 1 at ChildProcess.onCpExit hot 3
npm install error on windows 10 hot 2
Fails on every npm install on macOS Mojave hot 2
node-gyp: EPERM: operation not permitted, read hot 2
node-gyp rebuild failed hot 1
Node gyp build fails on node v12.1.0 hot 1
node-pre-gyp build fail error while installing with `npm install` or `npm install -d` hot 1
Is this an Issue with MACOS catalina? hot 1
gyp ERR! stack Error: `make` failed with exit code: 2 hot 1
gyp ERR! stack Error: `make` failed with exit code: 2 hot 1
Is this an Issue with MACOS catalina? hot 1
Is this an Issue with MACOS catalina? hot 1
Not able to build in osx 10.14.2 with java 10.0.1 hot 1
TypeError: '>=' not supported between instances of 'tuple' and 'str' hot 1
Breaks with VS2019 installed hot 1
Github User Rank List