Fix Pipeline settings path validation for external node module paths.
Review Request #14816 — Created Feb. 12, 2026 and updated
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 node
modules path.This was made evident when trying to run Power Pack's unit tests. Power Pack
relies on Review Board's node modules, but since thenpm execcommand was
ran from the Power Pack repository, it was looking in Power Pack's node
modules instead of Review Board's.This change fixes this so that the binaries are actually checked for in
the node modules paths, instead of the current working directory. If a
binary isn't found in any of the configured node module paths then we
raise the error.
- Ran unit tests.
- Was able to run Power Pack unit tests without hitting the
ImproperlyConfigurederror for rollup that I was hitting before.
| Summary | ID |
|---|---|
| fb589232b6e1785f61520dcfb59844fb9a73e2ba |
| Description | From | Last Updated |
|---|---|---|
|
Can we call this node_modules_paths? |
|
|
|
I tested here manually with a missing package and it prompted to install it. I checked the docs to see … |
|
|
|
If any of the node_modules paths in the list lack this, will we get an error for each one until … |
|
|
|
I wonder if we should now just log an error if a path in node_modules_path doesn't exist, since we now … |
|
-
-
I tested here manually with a missing package and it prompted to install it. I checked the docs to see what the stated behavior was if automating this, and it turns out that it assumes it should install. Looks like we need to pass
--nohere to disable that.If any requested packages are not present in the local project dependencies,
then a prompt is printed, which can be suppressed by providing either --yes
or --no. When standard input is not a TTY or a CI environment is detected,
--yes is assumed. The requested packages are installed to a folder in the npm
cache, which is added to the PATH environment variable in the executed
process. -
If any of the
node_modulespaths in the list lack this, will we get an error for each one until found? -
I wonder if we should now just log an error if a path in
node_modules_pathdoesn't exist, since we now build a list of paths to try. We'd probably still need to bail if the resulting list of paths is empty.