bugfix node npm version mismatches
authorAJ ONeal <aj@therootcompany.com>
Tue, 16 Jun 2020 22:19:22 +0000 (22:19 +0000)
committerAJ ONeal <aj@therootcompany.com>
Tue, 16 Jun 2020 22:19:22 +0000 (22:19 +0000)
node/install.sh

index 2a9eb86f12569c2150292286c4190200d860b7e5..4dd6655bb0f60e041133c1eb04c0f39342237b15 100644 (file)
@@ -34,6 +34,9 @@ pkg_link() {
 
     # ln -s "$HOME/.local/opt/node-v14.4.0" "$HOME/.local/opt/node"
     ln -s "$pkg_src" "$pkg_dst"
+
+    # Node bugfix: use the correct version of node, even if PATH has a conflict
+    "$pkg_src"/bin/node "$pkg_src"/bin/npm config set scripts-prepend-node-path=true
 }
 
 pkg_done_message() {