From 9b9059c8739421cb5776a4af7ed41111a9d7eec6 Mon Sep 17 00:00:00 2001 From: Chris McCormick Date: Sun, 7 Jul 2019 19:07:24 +0800 Subject: [PATCH] Add node_modules/.bin to node deploy path. (#54) This change allows for npm installed binaries (such as wisp, coffeescript, babel, etc.) to be used at deployment and run time. --- piku.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/piku.py b/piku.py index 1d64d0b..c0a2b4c 100755 --- a/piku.py +++ b/piku.py @@ -430,6 +430,7 @@ def deploy_node(app, deltas={}): env = { 'NODE_PATH': node_path, 'NPM_CONFIG_PREFIX': abspath(join(node_path, "..")), + "PATH": ':'.join([join(node_path, ".bin"),environ['PATH']]) } if exists(env_file): env.update(parse_settings(env_file, env)) @@ -513,6 +514,7 @@ def spawn_app(app, deltas={}): node_path = join(virtualenv_path, "node_modules") if exists(node_path): env["NODE_PATH"] = node_path + env["PATH"] = ':'.join([join(node_path, ".bin"),environ['PATH']]) # Load environment variables shipped with repo (if any) if exists(env_file):