Invalid ELF header Node js with couchbase db

前端 未结 1 810
耶瑟儿~
耶瑟儿~ 2021-01-14 23:07

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 r

相关标签:
1条回答
  • 2021-01-15 00:01

    The "invalid ELF header" error happens when you compile 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 compile that modules for the particular environment.

    Here is the documentation page about configuring and using your package.json: https://docs.npmjs.com/getting-started/using-a-package.json

    0 讨论(0)
提交回复
热议问题