-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Description
I've seen that in some cases, meteor build
doesn't include .bin
symlinks from npm modules in the app directory. This can break Galaxy when it rebuilds the app, if a package that needs to be rebuilt (eg bcrypt@1.0.0
) depends on a program (eg node-pre-gyp
) being on the PATH.
I've actually gone and done this experiment: in an empty directory, run meteor --release 1.4.2.3 create source && cd source && meteor npm install bcrypt && meteor build --directory ../built
, then tried it again including --save
in the bcrypt. I saved a full diff -ruN
of the directories (both source and built). (Note that in order to keep references to absolute paths in generated files constant, each "source" directory was under /tmp/experiment
when I ran meteor build
; I then moved them elsewhere for the diff.)
The output of the diff: https://gist.github.com/glasser/98826a5fbf5d63f0f265acf167009bd6
You can see that when I pass --save
, the symlinks are missing from built/bundle/programs/server/npm/node_modules/.bin
.
The only other differences are the missing bcrypt line in package.json (this is basically the definition of not passing --save
), a missing _requiredBy
line in bcrypt's package.json (similar), and a note in node_modules/bcrypt/build/config.gypi (in both source and built) noting that it was saved.
I'm not sure why this causes the meteor build process to drop the .bin
symlinks, but it does, and this breaks the ability to run npm rebuild
in the produced tarball (as Galaxy does).