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.

README.md 'How to Use' part misses important CLI argument

See original GitHub issue

Environment:

  • Windows 7 SP1 x64
  • Node.js 7.7.3
  • Git for Windows 2.12.0
  • Visual C++ Build Tools 2015
  • .NET Framework 4.6
  • Python 2.7.13
  • npm config set msvs_version 2015
  • cmd.exe shell

I had tried to build a small addon from node/benchmark/misc/function_call and have got an error. So I have read the advised ‘Microsoft’s Node.js Guidelines for Windows’ (this part) and try to add --msvs_version=2015 key to the node-gyp configure. This seems to fix the problem. So maybe a remark about the node-gyp configure --msvs_version=2015 command is needed for some environments.

Output with the error (click me):
J:\temp\_git\node-fork\benchmark\misc\function_call>node-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.0
gyp info using node@7.7.3 | win32 | x64
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\\Users\\vmb\\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=auto',
gyp info spawn args   '-I',
gyp info spawn args   'J:\\temp\\_git\\node-fork\\benchmark\\misc\\function_call\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\vmb\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\vmb\\.node-gyp\\7.7.3\\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\\vmb\\.node-gyp\\7.7.3',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\vmb\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=J:\\temp\\_git\\node-fork\\benchmark\\misc\\function_call',
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   'J:\\temp\\_git\\node-fork\\benchmark\\misc\\function_call\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok

J:\temp\_git\node-fork\benchmark\misc\function_call>node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.0
gyp info using node@7.7.3 | win32 | x64
gyp info spawn C:\Program Files (x86)\MSBuild\14.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' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewhere. [J:\temp\_git\node-fork\benchmark\misc\function_call\build\binding.sln]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\vmb\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:285:23)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:194:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\vmb\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd J:\temp\_git\node-fork\benchmark\misc\function_call
gyp ERR! node -v v7.7.3
gyp ERR! node-gyp -v v3.6.0
gyp ERR! not ok
Output with --msvs_version=2015 (click me):
J:\temp\_git\node-fork\benchmark\misc\function_call>node-gyp configure --msvs_version=2015
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.0
gyp info using node@7.7.3 | win32 | x64
gyp info spawn C:\Python27\python.EXE
gyp info spawn args [ 'C:\\Users\\vmb\\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   'J:\\temp\\_git\\node-fork\\benchmark\\misc\\function_call\\build\\config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\vmb\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   'C:\\Users\\vmb\\.node-gyp\\7.7.3\\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\\vmb\\.node-gyp\\7.7.3',
gyp info spawn args   '-Dnode_gyp_dir=C:\\Users\\vmb\\AppData\\Roaming\\npm\\node_modules\\node-gyp',
gyp info spawn args   '-Dnode_lib_file=node.lib',
gyp info spawn args   '-Dmodule_root_dir=J:\\temp\\_git\\node-fork\\benchmark\\misc\\function_call',
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   'J:\\temp\\_git\\node-fork\\benchmark\\misc\\function_call\\build',
gyp info spawn args   '-Goutput_dir=.' ]
gyp info ok

J:\temp\_git\node-fork\benchmark\misc\function_call>node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.0
gyp info using node@7.7.3 | win32 | x64
gyp info spawn C:\Program Files (x86)\MSBuild\14.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' ]
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
  binding.cc
  win_delay_load_hook.cc
     Creating library J:\temp\_git\node-fork\benchmark\misc\function_call\build\Release\binding.lib and object J:\temp\_git\node-fork\benchmark\misc\function_call\build\Release\binding.exp
  Generating code
  Finished generating code
  binding.vcxproj -> J:\temp\_git\node-fork\benchmark\misc\function_call\build\Release\\binding.node
  binding.vcxproj -> J:\temp\_git\node-fork\benchmark\misc\function_call\build\Release\binding.pdb (Full PDB)
gyp info ok

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SunshowerCcommented, Apr 23, 2017

thanks. i was disturbed by the problem all night.

0reactions
vsemozhetbytcommented, Mar 21, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

command-line-arguments/README.markdown at master
The first two arguments to the Args.apply() method provide help strings. The first shows how to run the application, e.g., run-main CLASampleMain as...
Read more >
Essential Sections for Better Documentation of a README ...
This article summarizes the appealing and essential ...
Read more >
Gating on README updates - Viktor Adam's blog
When a new command line flag is added, or the usage string changes for an existing one, this simple test will make sure...
Read more >
Command Line Operations - Markdown Monster Documentation
For example, to open README.md from a local WSL folder use: mm.exe README.md . Note that unlike on Windows the .exe extension is...
Read more >
Export - Typora Support
If you want to export and overwrite previous exported file using previous ... You could append extra command line arguments for pandoc, ...
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