问题描述
捆绑的node.fibers在部署到其他服务器后无法加载,出现以下错误:
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)
推荐答案
解开捆绑包后,必须重新安装节点光纤.要解决此问题,请转到服务器目录.
Node fibers have to be re-installed after unpacking the bundle. To fix this problem go to the server directory.
$ cd bundle/programs/server
然后卸载fibers
$ npm uninstall fibers
然后安装fibers
$ npm install fibers
然后启动您的应用程序
$ cd ../../
$ PORT=3000 MONGO_URL=mongodb://localhost:27017/myapp node bundle/main.js
每次更新应用程序时,您都必须重复一遍.这只是Meteor目前使用Node的方式.可以在此处找到潜在的长期修复方法: http://meteorhacks.com/how- meteor-uses-node.html
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
注意:在流星0.6.5和节点0.10.*上,这可能会略有不同.您可能必须手动从bundle/server
和bundle/programs/server
移除光纤.您可以使用$ rm -R node_modules/fibers
进行操作.然后,您必须使用$ npm install fibers
从两个位置重新安装光纤.
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
.
这篇关于流星束失败,因为Fibers.node丢失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!