Meteor 1.5 app builds, won't run, can't find fiber

My whole site was just killed by something, so I was forced to upgrade it to Meteor 1.5. Fortunately, this was relatively painless, but the server won’t start post-build.

Started Chiara String Quartet website.
Jun 22 17:50:43 vultr node[3697]: ## There is an issue with node-fibers ##
Jun 22 17:50:43 vultr node[3697]: /home/chiaraqu/csq/bundle/programs/server/node_modules/fibers/bin/linux-x64-11/fibers.node is missing.
Jun 22 17:50:43 vultr node[3697]: Try running this to fix the issue: /usr/local/bin/node /home/chiaraqu/csq/bundle/programs/server/node_modules/fibers/build
Jun 22 17:50:43 vultr node[3697]: /home/chiaraqu/csq/bundle/programs/server/node_modules/fibers/fibers.js:20
Jun 22 17:50:43 vultr node[3697]: #011throw new Error(‘Missing binary. See message above.’);
Jun 22 17:50:43 vultr node[3697]: #011 ^
Jun 22 17:50:43 vultr node[3697]: Error: Missing binary. See message above.
Jun 22 17:50:43 vultr node[3697]: at Object. (/home/chiaraqu/csq/bundle/programs/server/node_modules/fibers/fibers.js:20:8)
Jun 22 17:50:43 vultr node[3697]: at Module._compile (module.js:456:26)
Jun 22 17:50:43 vultr node[3697]: at Object.Module._extensions…js (module.js:474:10)
Jun 22 17:50:43 vultr node[3697]: at Module.load (module.js:356:32)
Jun 22 17:50:43 vultr node[3697]: at Function.Module._load (module.js:312:12)
Jun 22 17:50:43 vultr node[3697]: at Module.require (module.js:364:17)
Jun 22 17:50:43 vultr node[3697]: at require (module.js:380:17)
Jun 22 17:50:43 vultr node[3697]: at Object. (/home/chiaraqu/csq/bundle/programs/server/boot.js:1:75)
Jun 22 17:50:43 vultr node[3697]: at Module._compile (module.js:456:26)
Jun 22 17:50:43 vultr node[3697]: at Object.Module._extensions…js (module.js:474:10)
Jun 22 17:50:43 vultr systemd[1]: csq.service: Main process exited, code=exited, status=8/n/a
Jun 22 17:50:43 vultr systemd[1]: csq.service: Unit entered failed state.
Jun 22 17:50:43 vultr systemd[1]: csq.service: Failed with result ‘exit-code’.

and then:

chiaraqu@vultr:~/website/Chiara_Website/chiara$ /usr/local/bin/node /home/chiaraqu/csq/bundle/programs/server/node_modules/fibers/build
gyp info it worked if it ends with ok
gyp info using node-gyp@3.6.2
gyp info using node@4.8.3 | linux | x64
gyp info spawn /usr/bin/python2
gyp info spawn args [ ‘/usr/local/lib/node_modules/node-gyp/gyp/gyp_main.py’,
gyp info spawn args ‘binding.gyp’,
gyp info spawn args ‘-f’,
gyp info spawn args ‘make’,
gyp info spawn args ‘-I’,
gyp info spawn args ‘/home/chiaraqu/website/Chiara_Website/chiara/build/config.gypi’,
gyp info spawn args ‘-I’,
gyp info spawn args ‘/usr/local/lib/node_modules/node-gyp/addon.gypi’,
gyp info spawn args ‘-I’,
gyp info spawn args ‘/home/chiaraqu/.node-gyp/4.8.3/include/node/common.gypi’,
gyp info spawn args ‘-Dlibrary=shared_library’,
gyp info spawn args ‘-Dvisibility=default’,
gyp info spawn args ‘-Dnode_root_dir=/home/chiaraqu/.node-gyp/4.8.3’,
gyp info spawn args ‘-Dnode_gyp_dir=/usr/local/lib/node_modules/node-gyp’,
gyp info spawn args ‘-Dnode_lib_file=/home/chiaraqu/.node-gyp/4.8.3/<(target_arch)/node.lib’,
gyp info spawn args ‘-Dmodule_root_dir=/home/chiaraqu/website/Chiara_Website/chiara’,
gyp info spawn args ‘-Dnode_engine=v8’,
gyp info spawn args ‘–depth=.’,
gyp info spawn args ‘–no-parallel’,
gyp info spawn args ‘–generator-output’,
gyp info spawn args ‘build’,
gyp info spawn args ‘-Goutput_dir=.’ ]
gyp: binding.gyp not found (cwd: /home/chiaraqu/website/Chiara_Website/chiara) while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:12)
gyp ERR! System Linux 4.4.0-45-generic
gyp ERR! command “/home/chiaraqu/.nvm/versions/node/v4.8.3/bin/node” “/usr/local/bin/node-gyp” “rebuild” "–release"
gyp ERR! cwd /home/chiaraqu/website/Chiara_Website/chiara
gyp ERR! node -v v4.8.3
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment–
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: sudo apt-get install g++ build-essential
Alpine users please run: sudo apk add python make g++

Please help, the site has been down for 5 hours now, and I can’t fix it.

I get this same issue when I updated to meteor 1.6 on ubuntu 16.04 running nginx on Digital Ocean.

My app fails to start

root@ubuntu-512mb-fra1-01:/home/myapp# systemctl start myapp.service

Process: 2086 ExecStart=/usr/local/bin/node /home/myapp/bundle/main.js (code=exited, status=1/FAILURE)
 Main PID: 2086 (code=exited, status=1/FAILURE)

Nov 08 13:07:19 ubuntu-512mb-fra1-01 myapp[2086]:     at Module.load (module.js:531:32)

Then when I run the failing cmd directly like this

root@ubuntu-512mb-fra1-01:/home/myapp# /usr/local/bin/node /home/myapp/bundle/main.js

the error log points to a fibers issue

bundle/programs/server/node_modules/fibers/fibers.js:20
        throw new Error('Missing binary. See message above.');
        ^

Error: Missing binary. See message above.
....

This is fixed by running this cmd from bundle/README

root@ubuntu-512mb-fra1-01:/home/myapp/bundle# cd programs/server && npm install

1 Like

You need to run: npm install --production

1 Like