Luke Waltman
Luke Waltman

Reputation: 33

Meteor Application Fails to Find Fibers Binary; Yet NPM Built a Different One

I am deploying my Meteor bundle to a similar Ubuntu 18.04 system as development. After running meteor (starting the application), I get the following error:

## There is an issue with `node-fibers` ##
`/opt/docgen/bundle/programs/server/node_modules/fibers/bin/linux-x64-57-glibc/fibers.node` is missing.
Try running this to fix the issue: /usr/bin/node /opt/docgen/bundle/programs/server/node_modules/fibers/build
Error: Cannot find module '/opt/docgen/bundle/programs/server/node_modules/fibers/bin/linux-x64-57-glibc/fibers'
    at Function.Module._resolveFilename (module.js:547:15)
    at Function.Module._load (module.js:474:25)
    at Module.require (module.js:596:17)
    at require (internal/module.js:11:18)

Yet, npm install (and calling node build.js) built a binary of a different name for fibers:

ubuntu@ip-xxx-xx-xxx-xx:/opt/docgen/bundle/programs/server/node_modules/fibers$ node build.js 
`linux-x64-72-glibc` exists; testing
Binary is fine; exiting

Node version in dev and production:

ubuntu@ip-xxx-xx-xxx-3xxx-xx-xxx-xx:/opt/docgen/bundle/programs/server/node_modules/fibers$ node -v
v12.16.1

npm version:

ubuntu@ip-xxx-xx-xxx-xx:/opt/docgen/bundle/programs/server/node_modules/fibers$ npm -v
6.14.5

Upvotes: 2

Views: 971

Answers (2)

Luke Waltman
Luke Waltman

Reputation: 33

This problem appears to have been entirely caused by starting the application with Supervisor (Is supervisor unaware of some aspects of meteor?). Starting the application with systemd produces no such error as below.

Jun 17 05:06:55 ip-172-31-54-3 systemd[1]: Started AiLanthus Doc App.
Jun 17 05:06:56 ip-172-31-54-3 ailanthusdocs[31873]: Note: you are using a pure-JavaScript implementation of bcrypt.
Jun 17 05:06:56 ip-172-31-54-3 ailanthusdocs[31873]: While this implementation will work correctly, it is known to be
Jun 17 05:06:56 ip-172-31-54-3 ailanthusdocs[31873]: approximately three times slower than the native implementation.
Jun 17 05:06:56 ip-172-31-54-3 ailanthusdocs[31873]: In order to use the native implementation instead, run
Jun 17 05:06:56 ip-172-31-54-3 ailanthusdocs[31873]:   meteor npm install --save bcrypt
Jun 17 05:06:56 ip-172-31-54-3 ailanthusdocs[31873]: in the root directory of your application.
Jun 17 05:08:15 ip-172-31-54-3 ailanthusdocs[31873]: Before create temp file
Jun 17 05:08:15 ip-172-31-54-3 ailanthusdocs[31873]: Source Type: Filed Complaint
Jun 17 05:08:15 ip-172-31-54-3 ailanthusdocs[31873]: Matter ID: Sw9TS7tknvfuY7toB
Jun 17 05:08:17 ip-172-31-54-3 ailanthusdocs[31873]: It's saved!```

Upvotes: 0

coagmano
coagmano

Reputation: 5671

The number in the filename's binary is the ABI (application binary interface) version aka NODE_MODULE_VERSION on this table

Version 72 is Node 12, so it checks out that when you build fibers with Node 12, you get the linux-x64-72-glibc binary.

I'm guessing you are using Meteor 1.6 - 1.8, which uses Node 8

Node 8 uses ABI 57, which is what it's asking for. So you want to build fibers with Node 8 to get the right binary.

Note that this shouldn't be necessary for a working Meteor install, so I would start by reinstalling Meteor before manually rebuilding it's dependencies.

Upvotes: 1

Related Questions