Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working on Windows / VS 2019 #205

Closed
acceleratxr opened this issue Sep 7, 2019 · 6 comments
Closed

Not working on Windows / VS 2019 #205

acceleratxr opened this issue Sep 7, 2019 · 6 comments
Labels
help wanted windows Issues happening on Windows that maintainer can't help

Comments

@acceleratxr
Copy link

When trying to add or install as a dependency on Windows with Visual Studio 2019 installed I get the following errors.

Exit code: 7
Command: node-gyp-build
Arguments:
Directory: ...\node_modules\argon2
Output:
...\node_modules\argon2>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "" rebuild )
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | win32 | x64
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\\Program Files\\nodejs\\node_modules\\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   '...\\node_modules\\argon2\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '...\\.node-gyp\\10.16.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=...\\.node-gyp\\10.16.1',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=...\\.node-gyp\\10.16.1\\<(target_arch)\\node.lib',
gyp info spawn args   '-Dmodule_root_dir=...\\node_modules\\argon2',
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   '...\\node_modules\\argon2\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
gyp ERR! UNCAUGHT EXCEPTION
gyp ERR! stack Error: spawn C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\15.0\Bin\MSBuild.exe ENOENT
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
gyp ERR! stack     at onErrorNT (internal/child_process.js:415:16)
gyp ERR! stack     at process._tickCallback (internal/process/next_tick.js:63:19)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd ...\node_modules\argon2
gyp ERR! node -v v10.16.1
gyp ERR! node-gyp -v v3.8.0
@ranisalt ranisalt added help wanted windows Issues happening on Windows that maintainer can't help labels Sep 7, 2019
@hoangvvo
Copy link
Contributor

hoangvvo commented Sep 19, 2019

@erikyuzwa
Copy link

erikyuzwa commented Sep 25, 2019

affected by this as well, and went through a lot of the similar issue links in the node-gyp and other projects making use of node-gyp. A common suggestion is to find an older VS community version, however you now need a Visual Studio subscription (yes, even for Community editions it seems). Thanks Microsoft.

My only workaround was to uninstall VS2019 and dig out my old VS2010 install media.

@hoangvvo
Copy link
Contributor

@erikyuzwa refers to my previous comment, I tried it and can confirm that the workaround does work on Windows (10).

@erikyuzwa
Copy link

Thanks @hoangvvo - I shall try that. 🙇

@jeffrson
Copy link

jeffrson commented Mar 2, 2020

Works for me with

msbuild_path=C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\MSBuild.exe
msvs_version=2019

in .npmrc

@ranisalt
Copy link
Owner

ranisalt commented Mar 2, 2020

@acceleratxr can you confirm @jeffrson suggestion?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted windows Issues happening on Windows that maintainer can't help
Projects
None yet
Development

No branches or pull requests

5 participants