Hi, I’m trying to set up a production site on Uberspace and I’ve tried just deploying the default Meteor app but I can’t run the built version due to Fibers.
meteor build --architecture os.linux.x86_64 ../build and subsequently extracted the tarred file, and ran
meteor npm install in the
build/bundle/programs/server. However, when I tried to start the server with
node main.js in
bundle/, this is the error trace:
## There is an issue with `node-fibers` ## `/home/ajay/build/bundle/programs/server/node_modules/fibers/bin/linux-x64-93-glibc/fibers.node` is missing. Try running this to fix the issue: /home/ajay/.nvm/versions/node/v16.15.1/bin/node /home/ajay/build/bundle/programs/server/node_modules/fibers/build Error: Cannot find module '/home/ajay/build/bundle/programs/server/node_modules/fibers/bin/linux-x64-93-glibc/fibers' Require stack: - /home/ajay/build/bundle/programs/server/node_modules/fibers/fibers.js - /home/ajay/build/bundle/programs/server/boot.js - /home/ajay/build/bundle/main.js at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15) at Function.Module._load (node:internal/modules/cjs/loader:778:27) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/home/ajay/build/bundle/programs/server/node_modules/fibers/fibers.js:14:39) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Module.Mp._compile (/home/ajay/build/bundle/programs/server/runtime.js:99:23) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Module.Mp.load (/home/ajay/build/bundle/programs/server/runtime.js:46:33) /home/ajay/build/bundle/programs/server/node_modules/fibers/fibers.js:23 throw new Error('Missing binary. See message above.'); ^ Error: Missing binary. See message above. at Object.<anonymous> (/home/ajay/build/bundle/programs/server/node_modules/fibers/fibers.js:23:9) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Module.Mp._compile (/home/ajay/build/bundle/programs/server/runtime.js:99:23) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Module.Mp.load (/home/ajay/build/bundle/programs/server/runtime.js:46:33) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at Object.<anonymous> (/home/ajay/build/bundle/programs/server/boot.js:2:15)
I tried the suggestion to fix the issue with
node-gyp but that then threw an error that
gyp: binding.gyp not found (cwd: /home/ajay/build/bundle) while trying to load binding.gyp. I’m not sure if I should be having to do this in the first place.
I understand that Fibers are broken for Node versions >= 16. I tried downgrading the Node version when doing this too but I don’t think I did it correctly. Would anyone be able to suggest how to proceed?
A new user with the latest version of Node (or any version >= 16) and Meteor would not be able to successfully deploy the barebones example application made with
meteor create test-app because of this (that was my approach)
EDIT: I tried doing everything from scratch again, this time in node v14.19.1 (switched using
nvm, this is the same version that corresponds to
meteor npm -v) but I got the following error:
npm WARN deprecated email@example.com: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future > firstname.lastname@example.org install /home/ajay/build/bundle/programs/server/node_modules/fibers > node build.js || nodejs build.js `linux-x64-83-glibc` exists; testing Problem with the binary; manual build incoming /home/ajay/.meteor/packages/meteor-tool/.2.7.2.f538ay.0rlfj++os.linux.x86_64+web.browser+web.browser.legacy+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin/node-gyp: line 5: /usr/local/lib/node_modules/node-gyp/bin/node-gyp.js: No such file or directory node-gyp exited with code: 127 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` RHEL users please run: `yum install gcc-c++` and `yum groupinstall 'Development Tools'` Alpine users please run: `sudo apk add python make g++` sh: nodejs: command not found npm ERR! code ELIFECYCLE npm ERR! syscall spawn npm ERR! file sh npm ERR! errno ENOENT npm ERR! email@example.com install: `node build.js || nodejs build.js` npm ERR! spawn ENOENT npm ERR! npm ERR! Failed at the firstname.lastname@example.org install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! /home/ajay/.npm/_logs/2022-06-03T07_18_48_840Z-debug.log
When I try to install
node-gyp the same error is thrown.