node_cache: Fix buggy production deployment code.

The previous version of the production deployment code for release
tarballs did not correctly install the node_modules directory.
This commit is contained in:
Tim Abbott
2016-12-07 23:03:33 -08:00
parent 8b77889f8a
commit 95a49f6ea2

View File

@@ -55,7 +55,8 @@ def do_npm_install(target_path, npm_args, stdout=None, stderr=None, copy_modules
]
if copy_modules:
print("Cached version not found! Copying node modules.")
cmds.append(["mv", "node_modules", target_path])
cmds.append(["cp", "-rT", "prod-static/serve/node_modules",
os.path.join(target_path, "node_modules")])
else:
print("Cached version not found! Installing node modules.")
cmds.append(['npm', 'install'] + npm_args + ['--prefix', target_path])