I am struggling to push my application to a production environment. The development and production machine is the same, but I use different accounts. These are my steps:
On development account:
- npm version 4.5.0, node version v7.7.3, Meteor version 1.4.4.2
- run meteor build to produce the application bundle
On production account:
- start with a clean file tree structure (no directories like .meteor, .nodes , .node-gyp, .npm)
- Create directories mkdir -p ~/.nodes && cd ~/.nodes
- download the latest version of nodejs: curl -O http://nodejs.org/dist/latest/node-v7.10.0-linux-x86.tar.xz
- Unpack it: tar xf node-v7.10.0-linux-x86.tar.xz
- Remove the original file: rm node-v7.10.0-linux-x86.tar.xz
- Create a link ln -s node-v7.10.0-linux-x86 current
- Use the installed binaries: export PATH="~/.nodes/current/bin:$PATH"
- npm version 4.2.0; node version v7.10.0 (from ~/.nodes/current/bin/node)
- Go to home directory, extract the bundle, change directory cd ~ && tar xf … && cd bundle
- The README file instructs me to execute (cd programs/server && npm install)
And this is what I get:
meteor-dev-bundle@0.0.0 install /home/az/cdb/bundle/programs/server
node npm-rebuild.js
npm WARN lifecycle npm is using /usr/bin/node but there is no node binary in the current PATH. Use the
--scripts-prepend-node-path
option to include the path for the node binary npm was executed with.
bcrypt@1.0.2 install /home/az/cdb/bundle/programs/server/npm/node_modules/bcrypt
node-pre-gyp install --fallback-to-build
npm ERR! file sh
npm ERR! path sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn sh
npm ERR! bcrypt@1.0.2 install:node-pre-gyp install --fallback-to-build
npm ERR! spawn sh ENOENT
npm ERR!
npm ERR! Failed at the bcrypt@1.0.2 install script ‘node-pre-gyp install --fallback-to-build’.
etc…
This problem is NOT new, many people have reported the issue. But so far I did not manage to find any solution.
Do I do something wrong? Is it related to a buggy software (why the development version works than?!) Do I miss the correct procedure (please, give me a link!).
Any help is deeply appreciated!!!