CyCoreSystems / docker-meteor

Dockerfile and script for running Meteor on Docker
MIT License
120 stars 73 forks source link

Missing make #59

Open kaihendry opened 6 years ago

kaihendry commented 6 years ago

We recently upgraded to Meteor 1.7 and now this image is failing to run our bundle: https://unee-t-media.s3-accelerate.amazonaws.com/frontend/commit/15be07e.tar.gz

Tbh I assumed that a bundle was ready to go, so I was surprised to see npm at work in the logs... and failing.

Checking Meteor version...
Installing NPM prerequisites...
> fibers@2.0.0 install /home/meteor/www/bundle/programs/server/node_modules/fibers
> node build.js || nodejs build.js
gyp ERR! build error
gyp ERR! stack Error: not found: make
gyp ERR! stack at getNotFoundError (/usr/lib/node_modules/npm/node_modules/which/which.js:14:12)
gyp ERR! stack at F (/usr/lib/node_modules/npm/node_modules/which/which.js:69:19)
gyp ERR! stack at E (/usr/lib/node_modules/npm/node_modules/which/which.js:81:29)
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/which.js:90:16
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/index.js:44:5
gyp ERR! stack at /usr/lib/node_modules/npm/node_modules/which/node_modules/isexe/access.js:8:5
gyp ERR! stack at FSReqWrap.oncomplete (fs.js:82:15)
gyp ERR! System Linux 4.14.51-60.38.amzn1.x86_64
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/meteor/www/bundle/programs/server/node_modules/fibers
gyp ERR! node -v v4.8.6
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok
node-gyp exited with code: 1

So what's the path forward here? Add build-essential to https://github.com/CyCoreSystems/docker-meteor/blob/master/Dockerfile ?

Ulexus commented 6 years ago

There is a :build tag which contains build-essential. If there is something new with 1.7 which requires it, I can add it back in; it's just a pretty large addition.

kaihendry commented 6 years ago

Thanks, ulexus/meteor:build gets further, but then chokes with:

Starting Meteor Application...
/home/meteor/www/bundle/programs/server/boot.js:49
    const { pause } = require("./debug.js");
          ^
SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/meteor/www/bundle/main.js:4:1)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)

I think it's something to do with nodejs binary running the app. Why don't you use meteor run here? https://github.com/CyCoreSystems/docker-meteor/blob/master/entrypoint.sh#L200

kaihendry commented 6 years ago

IIUC meteor doesn't contain node in the bundle? Or somehow express it's dependency on node. Weird.

It would appear node 4 is too old https://github.com/CyCoreSystems/docker-meteor/blob/master/Dockerfile#L10