Meteor bundle fails because fibers.node is missing
Asked Answered
I

3

23

The bundled node.fibers fails to load after deployment to a different server with the following error:

/home/ec2-user/bundle/server/node_modules/fibers/fibers.js:13
    throw new Error('`'+ modPath+ '.node` is missing. Try reinstalling `node-fibe
          ^
Error: `/home/ec2-user/bundle/server/node_modules/fibers/bin/linux-x64-v8-3.11/fibers.node` is missing. Try reinstalling `node-fibers`?
    at Object.<anonymous> (/home/ec2-user/bundle/server/node_modules/fibers/fibers.js:13:8)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/ec2-user/bundle/server/server.js:3:1)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
Ivaivah answered 10/11, 2012 at 23:24 Comment(1)
In case this would be of use to you, here's an EC2 install script for Meteor: gist.github.com/matb33/5322002Janeyjangle
I
56

Node fibers have to be re-installed after unpacking the bundle. To fix this problem go to the server directory.

$ cd bundle/programs/server

Then un-install fibers

$ npm uninstall fibers

Then install fibers

$ npm install fibers

Then start your application

$ cd ../../
$ PORT=3000 MONGO_URL=mongodb://localhost:27017/myapp node bundle/main.js

You will have to repeat that every time you update the app. This is just the way Meteor uses Node at the moment. Potential long-term fix can be found here: http://meteorhacks.com/how-meteor-uses-node.html

NOTE: On Meteor 0.6.5 and Node 0.10.* this may work slightly differently. You may have to remove fibers manually from bundle/server as well as bundle/programs/server. You can do that with $ rm -R node_modules/fibers. Then you'll have to reinstall fibers from both locations with $ npm install fibers.

Ivaivah answered 10/11, 2012 at 23:29 Comment(10)
Thanks for pointing out that the fibers module needs to be installed INSIDE of the server folder. Everybody else missed that very important detail.Lydalyddite
Why is it necessary to re-install fibers? None of the other node modules bundled with the server need to be re-installed? The reademe created with the bundle says that you need in INSTALL fibers, but it doesn't mention UNINSTALLING first. This appears to be an oversight.Lerner
Installing in bundle/programs/server as opposed to only bundle/serveris the key to get this working.Warrington
Not working for me with Meteor 0.6.5.1 on Linux. Console just hangs when I run "node main.js". I tried an "strace", which reveals that it gets stuck on "epoll_wait(5,"Maren
@GraemePyle I have the same problem, console hangs.Gurley
@graemepyle I upgrade meteor to 0.6.6. Fixed the issue.Gurley
for those here reading with Windows10, npm 3.6.0, node 5.8.0, meteor 1.2.1, I had to uninstall fibre in C:/users/<myuser>/node_modules... I did not have to reinstall it, either, when using iron create my-project, it did automatically install it correctlyOrtego
Iam facing the same issue..But its running on bluemix..Can someone help me out how we can fix thisBaseler
Just putting here in case there are other people having this issue. I did npm install fibers@3 as suggested in the fibers's documentation to make it work with node 8.9.4. My npm version is 6.5.0 and the npm inside meteor is 5.6.0. Doing meteor npm install fibers@3 inside bundle/programs/server didn't work for me, but doing npm install fibers@3 worked.Langston
Guys, this is a global package, no need to attach it to your project. $ rm -R node_modules/fibers and then $ npm install fibers -gSupermundane
P
2

I had the same issue with Meteor 1.0.3.2 and Node 0.12.0. I had to downgrade to Node 0.10.31. This fixed the issue.

Remember all instructions are in the readme file in the bundle folder.

Paco answered 9/3, 2015 at 11:46 Comment(1)
really old post? nodejs.org says v4.4.0 LTS and v5.8.0 stable are latestOrtego
C
2

Mismatched Node Versions

The versions of node MUST match when you do the npm install and when you run the meteor app: node app.js.

Otherwise you can end up with different versions of expected glibc folders...

To see if you have this problem:

  1. note the runtime error you are seeing. For example, in my case:
Try running this to fix the issue: /usr/bin/node <bundle location>/bundle/programs/server/node_modules/fibers/build
Cannot find module '<bundle location>/bundle/programs/server/node_modules/fibers/bin/linux-x64-83-libc/fibers`
  • The fix instructions referred to /usr/bin/node even though I was managing my node version via nvm.
  • The executable was looking for fibers in the linux-x64-83-libc folder.
  1. navigate to bundle/programs/server/node_modules/fibers/bin & examine your glibc subfolders. In my case: linux-x64-57-glibc & linux-x64-64-glibc
  • My executable is looking for linux-x64-83-libc & it does not exist.

Notes

In my case I was using nvm to manage my node versions. But as I could see in the fix instructions, my executable was using /usr/bin/node and not the nvm version I was expecting.

Fix

I removed the /usr/bin/node version via sudo apt-get remove nodejs and all was good. Everything started using the nvm version.

Coronograph answered 7/3, 2021 at 21:36 Comment(1)
sudo apt-get uninstall nodejs is not correct, use sudo apt-get remove nodejs insteadSunstroke

© 2022 - 2024 — McMap. All rights reserved.