admin管理员组文章数量:1323335
I've seen a handful of posts about this issue but the results all seem to be specific to the users configuration. I'm using couchbase db with a express js server. When I run the code locally (windows) it works fine. The database it self is hosted on a linux server. When I deploy the code to our testing environment ( linux ), I'm getting this error when I try to run "node server.js":
/var/www/html/BTRnode/node_modules/couchbase/node_modules/bindings/bindings.js:83
throw 8
Error: /var/www/html/BTRnode/node_modules/couchbase/build/Release/couchbase_impl.node: invalid ELF header
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:364:17)
at ....
I'm pletely lost on what to do in this situation. As mentioned before, it seemed to me like all the fixes in other peoples situation was some system configuration. I'm not sure what to post here to help you see any configuration that might help, but I can sure add it if needed. Also if there be a more general solution or error that I'm mitting that'd be helpful to know to.
Question: What do I need to do to get this to run?
I've seen a handful of posts about this issue but the results all seem to be specific to the users configuration. I'm using couchbase db with a express js server. When I run the code locally (windows) it works fine. The database it self is hosted on a linux server. When I deploy the code to our testing environment ( linux ), I'm getting this error when I try to run "node server.js":
/var/www/html/BTRnode/node_modules/couchbase/node_modules/bindings/bindings.js:83
throw 8
Error: /var/www/html/BTRnode/node_modules/couchbase/build/Release/couchbase_impl.node: invalid ELF header
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:364:17)
at ....
I'm pletely lost on what to do in this situation. As mentioned before, it seemed to me like all the fixes in other peoples situation was some system configuration. I'm not sure what to post here to help you see any configuration that might help, but I can sure add it if needed. Also if there be a more general solution or error that I'm mitting that'd be helpful to know to.
Question: What do I need to do to get this to run?
Share Improve this question asked Jan 16, 2016 at 0:55 discodanediscodane 2,0954 gold badges25 silver badges38 bronze badges1 Answer
Reset to default 10The "invalid ELF header" error happens when you pile modules on one architecture and then try to run them on another. I'm guessing you're copying your entire project folder over, rather than installing the architecture-specific node modules on the testing environment. Make sure your package.json file is configured correctly, delete (or better yet, don't copy) your node_modules folder, and then run npm install
on the target environment. This will pull and pile that modules for the particular environment.
Here is the documentation page about configuring and using your package.json: https://docs.npmjs./getting-started/using-a-package.json
本文标签: javascriptInvalid ELF header Node js with couchbase dbStack Overflow
版权声明:本文标题:javascript - Invalid ELF header Node js with couchbase db - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742135673a2422356.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论