Reputation: 1679
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)
Upvotes: 23
Views: 29150
Reputation: 771
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...
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`
/usr/bin/node
even though I was managing my node version via nvm
.fibers
in the linux-x64-83-libc
folder.bundle/programs/server/node_modules/fibers/bin
& examine your glibc
subfolders. In my case: linux-x64-57-glibc
& linux-x64-64-glibc
linux-x64-83-libc
& it does not exist.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.
I removed the /usr/bin/node
version via sudo apt-get remove nodejs
and all was good. Everything started using the nvm
version.
Upvotes: 2
Reputation: 1679
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
.
Upvotes: 56
Reputation: 4489
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.
Upvotes: 2