Fix Pipeline settings path validation for external node module paths.
Review Request #14816 — Created Feb. 12, 2026 and updated — Latest diff uploaded
We recently changed the way that we check whether
babel,lessc,rollup
anduglifyjsbinaries exist in the node modules path when building
Pipeline settings. We used to hard-code paths like
<node_modules_path>/.bin/rollupand check for their existence, but now
we use thenpm execcommand.However, we invoke the command from the current working directory, when we
should actually be invoking it from the parent directory of the given node
modules path. This was made evident when trying to build Power Pack or run
its unit tests. Power Pack relies on the binaries in Review Board's node
modules, butnpm execwas being run from Power Pack's node modules
directory.This change fixes this so that the binaries are actually checked for in
the node modules paths, instead of the current working directory. And
we now include the consuming application's node modules path when
building the static media for an extension. If the binary is found,
then we use that path when running the binary withnpm exec.We also add handling for when
node_modules_pathis an empty string.
This can happen if we didn't find any node modules directories, which
should be an error state. Whenvalidate_paths=Falseand we have an
emptynode_modules_path, we use the current working directory as
the path.And finally this updates the docstring to (I hope) clarify the
validate_pathsargument and when it should be set toFalse, and
clarifies the expectations ofnode_modules_pathwhen
validate_paths=False.
- Ran unit tests.
- Was able to run Power Pack unit tests without hitting the
ImproperlyConfigurederror for rollup. - Was able to build a Power Pack package against a development server
of Review Board without hitting theImproperlyConfigurederror for
rollup. - Set
node_modules_pathwithvalidate_paths=Trueto an empty string,
a real path valid path and a non-existent one separated by a colon,
a real path valid path, and a non-existent path. - Ran the dev server, previously saw an error about the rollup command
failing but its gone away with this fix.