0x61726b/electron-vibrancy

MSbuild toolset version issues

Haeri opened this issue · 5 comments

Haeri commented

There is a version mismatch on Windows 10 concerning the msbuild version that I just can't fix.
The generated Vibrancy.vcxproj contains the macro $(VCTargetsPath). This was not set at all on my computer.

I first tried to botch in the VCTargetsPath variable in the registry and in the environment variables as described here, but realized that the destination $(MSBuildExtensionsPath32)\Microsoft.Cpp\v4.0\ didn't even exist on my filesystem.

Next I installed the Windows-Build-Tools. This actually generated the C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140 directory. But this still does't work out, as the installed version is v140 and the vibrancy installation expects V110. I have set the msvc_version to 2015 (2015 is the v140 version which is present on my machine) with the following command from this page
npm config set msvs_version 2015
and
node-gyp configure --msvs_version=2015.
Still the installer insists and uses the 2012 version with V110.

Here is the entire log:

PS C:\Users\haeri\Documents\github\electron-vibrancy> npm install

> electron-vibrancy@0.1.3 install C:\Users\haeri\Documents\github\electron-vibrancy
> node-gyp rebuild


C:\Users\haeri\Documents\github\electron-vibrancy>if not defined npm_config_node_gyp (node "C:\Users\haeri\AppData\Roaming\npm\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Users\haeri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen
Sie den Schalter "/m" hinzufügen.
C:\Users\haeri\Documents\github\electron-vibrancy\build\Vibrancy.vcxproj(20,3): error MSB4019: Das importierte Projek
t "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" wurde nicht gefunden. Vergewis
sern Sie sich, dass der Pfad in der <Import>-Deklaration korrekt und die Datei auf dem Datenträger vorhanden ist.
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\haeri\AppData\Roaming\npm\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\haeri\Documents\github\electron-vibrancy
gyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron-vibrancy@0.1.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron-vibrancy@0.1.3 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\haeri\AppData\Roaming\npm-cache\_logs\2018-08-21T16_29_54_891Z-debug.log

I am about to go insane. Please put me out of this misery.

Hey, first of all, you could be able to build electron-vibrancy with V140 (I can on my PC). The project does not expect any specific visual studio version. But your node-gyp seems to be configured for V110. Can you add --verbose when building and check which version it says it is using?

node-gyp rebuild --verbose

Haeri commented

Hi there.
Thanks for the reply!

As I have stated in the original question, I have set both npm as well as node-gyp to use vs15 with the following commands:
npm config set msvs_version 2015
and
node-gyp configure --msvs_version=2015
From what I can tell in the log, node-gyp seems to be set to the correct version.

But here is the full verbose log:

PS C:\Users\haeri\Documents\github\electron-vibrancy> node-gyp rebuild --verbose
gyp info it worked if it ends with ok
gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe',
gyp verb cli   'C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js',
gyp verb cli   'rebuild',
gyp verb cli   '--verbose' ]
gyp info using node-gyp@3.8.0
gyp info using node@8.11.1 | win32 | x64
gyp verb command rebuild []
gyp verb command clean []
gyp verb clean removing "build" directory
gyp verb command configure []
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed  python2 { Error: not found: python2
gyp verb `which` failed     at getNotFoundError (C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:13:12)
gyp verb `which` failed     at F (C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:68:19)
gyp verb `which` failed     at E (C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:80:29)
gyp verb `which` failed     at C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\which\which.js:89:16
gyp verb `which` failed     at C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\index.js:42:5
gyp verb `which` failed     at C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\node_modules\isexe\windows.js:36:5
gyp verb `which` failed     at FSReqWrap.oncomplete (fs.js:152:21)
gyp verb `which` failed   stack: 'Error: not found: python2\n    at getNotFoundError (C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\node_modules\\which\\which.js:13:12)\n    at F (C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\node_modules\\which\\which.js:68:19)\n    at E (C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\node_modules\\which\\which.js:80:29)\n    at C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\node_modules\\which\\which.js:89:16\n    at C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\node_modules\\isexe\\index.js:42:5\n    at C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\node_modules\\isexe\\windows.js:36:5\n    at FSReqWrap.oncomplete (fs.js:152:21)',
gyp verb `which` failed   code: 'ENOENT' }
gyp verb check python checking for Python executable "python" in the PATH
gyp verb `which` succeeded python C:\Program Files (x86)\Python\python.EXE
gyp verb check python version `C:\Program Files (x86)\Python\python.EXE -c "import sys; print "2.7.13
gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j
gyp verb get node dir no --target version specified, falling back to host node version: 8.11.1
gyp verb command install [ '8.11.1' ]
gyp verb install input version string "8.11.1"
gyp verb install installing version: 8.11.1
gyp verb install --ensure was passed, so won't reinstall if already installed
gyp verb install version is already installed, need to check "installVersion"
gyp verb got "installVersion" 9
gyp verb needs "installVersion" 9
gyp verb install version is good
gyp verb get node dir target node version installed: 8.11.1
gyp verb build dir attempting to create "build" dir: C:\Users\haeri\Documents\github\electron-vibrancy\build
gyp verb build dir "build" dir needed to be created? C:\Users\haeri\Documents\github\electron-vibrancy\build
gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.Windows81SDK
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.Windows10SDK.17134
gyp verb find vs2017   - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64
gyp verb find vs2017   - Found Microsoft.VisualStudio.VC.MSBuild.Base
gyp verb find vs2017   - Using this installation with Windows 10 SDK
gyp verb find vs2017 using installation: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools
gyp verb build/config.gypi creating config file
gyp verb build/config.gypi writing out config file: C:\Users\haeri\Documents\github\electron-vibrancy\build\config.gypi
gyp verb config.gypi checking for gypi file: C:\Users\haeri\Documents\github\electron-vibrancy\config.gypi
gyp verb common.gypi checking for gypi file: C:\Users\haeri\Documents\github\electron-vibrancy\common.gypi
gyp verb gyp gyp format was not specified; forcing "msvs"
gyp info spawn C:\Program Files (x86)\Python\python.EXE
gyp info spawn args [ 'C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\gyp\\gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'msvs',
gyp info spawn args   '-G',
gyp info spawn args   'msvs_version=2015',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\haeri\\Documents\\github\\electron-vibrancy\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\haeri\\.node-gyp\\8.11.1\\include\\node\\common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=C:\\Users\\haeri\\.node-gyp\\8.11.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=C:\\Users\\haeri\\.node-gyp\\8.11.1\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=C:\\Users\\haeri\\Documents\\github\\electron-vibrancy',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'C:\\Users\\haeri\\Documents\\github\\electron-vibrancy\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp verb command build []
gyp verb build type Release
gyp verb architecture x64
gyp verb node dev dir C:\Users\haeri\.node-gyp\8.11.1
gyp verb found first Solution file build/binding.sln
gyp verb `which` succeeded for `msbuild` C:\Windows\Microsoft.NET\Framework\v4.0.30319\msbuild.EXE
gyp info spawn msbuild
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
Die Projekte in dieser Projektmappe werden nacheinander erstellt. Um eine parallele Erstellung zu ermöglichen, müssen
Sie den Schalter "/m" hinzufügen.
Der Buildvorgang wurde am 21.08.2018 23:58:56 gestartet.
Projekt "C:\Users\haeri\Documents\github\electron-vibrancy\build\binding.sln" auf Knoten "1" (Standardziele).
ValidateSolutionConfiguration:
  Die Projektmappenkonfiguration "Release|x64" wird erstellt.
Das Projekt "C:\Users\haeri\Documents\github\electron-vibrancy\build\binding.sln" (1) erstellt "C:\Users\haeri\Docume
nts\github\electron-vibrancy\build\Vibrancy.vcxproj" (2) auf Knoten "1" (Standardziele).
C:\Users\haeri\Documents\github\electron-vibrancy\build\Vibrancy.vcxproj(21,3): error MSB4019: Das importierte Projek
t "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" wurde nicht gefunden. Vergewis
sern Sie sich, dass der Pfad in der <Import>-Deklaration korrekt und die Datei auf dem Datenträger vorhanden ist.
Die Erstellung des Projekts "C:\Users\haeri\Documents\github\electron-vibrancy\build\Vibrancy.vcxproj" ist abgeschlos
sen (Standardziele) -- FEHLER.

Die Erstellung des Projekts "C:\Users\haeri\Documents\github\electron-vibrancy\build\binding.sln" ist abgeschlossen (
Standardziele) -- FEHLER.


Fehler beim Buildvorgang.

"C:\Users\haeri\Documents\github\electron-vibrancy\build\binding.sln" (Standardziel) (1) ->
"C:\Users\haeri\Documents\github\electron-vibrancy\build\Vibrancy.vcxproj" (Standardziel) (2) ->
  C:\Users\haeri\Documents\github\electron-vibrancy\build\Vibrancy.vcxproj(21,3): error MSB4019: Das importierte Proj
ekt "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.Cpp.Default.props" wurde nicht gefunden. Vergew
issern Sie sich, dass der Pfad in der <Import>-Deklaration korrekt und die Datei auf dem Datenträger vorhanden ist.

    0 Warnung(en)
    1 Fehler

Verstrichene Zeit 00:00:00.16
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\haeri\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:262:23)gyp ERR! stack     at emitTwo (events.js:126:13)
gyp ERR! stack     at ChildProcess.emit (events.js:214:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)
gyp ERR! System Windows_NT 10.0.17134
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\haeri\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose"
gyp ERR! cwd C:\Users\haeri\Documents\github\electron-vibrancygyp ERR! node -v v8.11.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok

The output log states that it is using
gyp info spawn args 'msvs_version=2015',
but still choosing V110 build tools. This seems like a registry error, which I think, somewhere down in the line V140 is pointing at V110 files. I've never used windows-build-tools so I'd just install visual studio build tools and try with that.

Haeri commented

I have already installed on my system:
Visual Studio Community 2017 - 15.7.3
and
Visual Studio Build Tools 2017 - 15.8.1

Haeri commented

Issue was resolved when I reinstalled Windows. Was probably a personal issue so I am closing this. Thanks for the suggestions anyway.