From ff09e101eea8d3a28bca8efb6d5e61b773066b03 Mon Sep 17 00:00:00 2001 From: Geoff Schmidt Date: Mon, 29 Apr 2013 06:37:05 -0700 Subject: [PATCH] If we're using an arch-specific, auto-downloaded dev_bundles kit, get rid of the bundled node_modules --- tools/server/target.sh.in | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/server/target.sh.in b/tools/server/target.sh.in index 35f8197768..f7534c675f 100644 --- a/tools/server/target.sh.in +++ b/tools/server/target.sh.in @@ -19,5 +19,15 @@ mv "$BUNDLE_TMPDIR" "dependencies" trap - EXIT set +e +# If there are global node_modules in the bundle, remove them, since +# they override NODE_PATH. Why are these present? Well, 'meteor +# bundle' historically embeds them to give you a self-contained +# bundle. But that never worked very well, because you'd get the +# version for the arch you built on, and you'd have to manually +# rebuild the binary modules (node-fibers) on the target system. It is +# not ideal to have the bundle modify itself (much better for it to be +# immutable) but ti'll do for now. +rm -rf node_modules + export NODE_PATH="`pwd`/dependencies/lib/node_modules" dependencies/bin/node boot.js ##IMAGE##