Skip to content

Commit

Permalink
[nodejs,angular] stop adding local node_modules/.bin to path
Browse files Browse the repository at this point in the history
Why
===
* We were having issues where our local node_modules bin had a "which"
binary that did not behave well.
* It isn't typical for local node_modules/.bin to be on the path, if
you want something on the path, you typically use npm install
--global, which is still added to the PATH after this change.

What changed
===
* Remove $REPL_HOME/node_modules/.bin from PATH

Test plan
===
* Check template tester still passes
* Check PATH does not contain that path in nodejs Repls
  • Loading branch information
ryantm committed Jun 27, 2024
1 parent 5a64b7f commit 63936f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkgs/modules/angular/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ in
env = {
XDG_CONFIG_HOME = "$REPL_HOME/.config";
npm_config_prefix = "$REPL_HOME/.config/npm/node_global";
PATH = "$XDG_CONFIG_HOME/npm/node_global/bin:$REPL_HOME/node_modules/.bin";
PATH = "$XDG_CONFIG_HOME/npm/node_global/bin";
};

dev.runners.dev-runner = {
Expand Down
2 changes: 1 addition & 1 deletion pkgs/modules/nodejs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ in
env = {
XDG_CONFIG_HOME = "$REPL_HOME/.config";
npm_config_prefix = "$REPL_HOME/.config/npm/node_global";
PATH = "${npx-wrapper}/bin:$XDG_CONFIG_HOME/npm/node_global/bin:$REPL_HOME/node_modules/.bin";
PATH = "${npx-wrapper}/bin:$XDG_CONFIG_HOME/npm/node_global/bin";
};

};
Expand Down

0 comments on commit 63936f3

Please sign in to comment.