nodejs/node · error · ValueError
Could not find executable. Should be
Error message
Could not find executable. Should be
What it means
The test runner's GetVm() computes the path to the node binary it will execute tests against (out/Release/node, out/Debug/node, out/<arch>.<mode>/node, or the Windows .exe variants) and checks it exists. If the binary is absent it raises ValueError, since no test could run.
Source
Thrown at tools/test.py:992
def GetVm(self, arch, mode):
if self.vm is not None:
return self.vm
if arch == 'none':
name = 'out/Debug/node' if mode == 'debug' else 'out/Release/node'
else:
name = 'out/%s.%s/node' % (arch, mode)
# Currently GYP does not support output_dir for MSVS.
# http://code.google.com/p/gyp/issues/detail?id=40
# It will put the builds into Release/node.exe or Debug/node.exe
if utils.IsWindows():
if not exists(name + '.exe'):
name = name.replace('out/', '')
name = os.path.abspath(name + '.exe')
if not exists(name):
raise ValueError('Could not find executable. Should be ' + name)
return name
def GetTimeout(self, mode, section=''):
timeout = self.timeout * TIMEOUT_SCALEFACTOR[ARCH_GUESS or 'ia32'][mode]
if section == 'pummel' or section == 'benchmark':
timeout = timeout * 6
# We run all WPT from one subset in the same process using workers.
# As the number of the tests grow, it can take longer to run some of the
# subsets, but it's still overall faster than running them in different
# processes.
elif section == 'wpt':
timeout = timeout * 12
return timeout
def RunTestCases(cases_to_run, progress, tasks, flaky_tests_mode, measure_flakiness):
progress = PROGRESS_INDICATORS[progress](cases_to_run, flaky_tests_mode, measure_flakiness)
return progress.Run(tasks)View on GitHub (pinned to 1b2de5e052)
Solutions
- Build first with the matching config, e.g. `make -j$(nproc)` (produces out/Release/node).
- Align --mode (release/debug) and --arch with the build output that exists.
- On Windows ensure node.exe exists; the code falls back to Release/node.exe when out/... is missing.
Example fix
// before python tools/test.py --mode=debug # never built Debug // after make -j$(nproc) # builds out/Release/node python tools/test.py --mode=release
Defensive patterns
Strategy: validation
Validate before calling
import os
exe='out/Release/node' if mode=='release' else 'out/Debug/node'
assert os.path.exists(exe), f'missing {exe}; build first' Prevention
- Always build before running the test suite.
- Keep --arch/--mode consistent with the directory you actually built into.
When it happens
Trigger: Running `python tools/test.py` (or `make test`) without building node first, or with --arch/--mode that select a build output directory that does not exist.
Common situations: Forgot to run make/ninja; built Release but tested Debug (or vice versa); ran `make clean` then test; cross-compiling without the target binary present.
Related errors
- Malformed line: '%s'.
- Cannot find out dir, did you run build?
- Every filter in --filters must start with + or - ({filt} doe
- Could not find pattern matching %s
- No Node inspector protocol revision found
AI-assisted analysis of nodejs/node@1b2de5e052 (2026-08-13).
Data as JSON: /api/errors/4258d3d9b54be802.
Report an issue: GitHub.