Error -- segfault-handler.node: invalid ELF header

Local Windows generated bundle and Ubuntu 20.04 LTS both have node of version v8.17.0.
After copied the gz file to the server and unzipped it then cd /program/server && npm install.
Afterwords, Start the node.js through pm2 then it shows the error below:image


0|test  | Error: /var/meteor/bundle/programs/server/npm/node_modules/segfault-handler/build/Release/segfault-handler.node: invalid ELF header
0|test  |     at Object.Module._extensions..node (module.js:682:18)
0|test  |     at Module.load (module.js:566:32)
0|test  |     at Module.Mp.load (/var/meteor/bundle/programs/server/runtime.js:15:31)
0|test  |     at tryModuleLoad (module.js:506:12)
0|test  |     at Function.Module._load (module.js:498:3)
0|test  |     at Module.require (module.js:597:17)
0|test  |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:80:39)
0|test  |     at require (internal/module.js:11:18)
0|test  |     at bindings (/var/meteor/bundle/programs/server/npm/node_modules/bindings/bindings.js:112:48)
0|test  |     at Object.<anonymous> (/var/meteor/bundle/programs/server/npm/node_modules/segfault-handler/index.js:3:37)
0|test  |     at Module._compile (module.js:653:30)
0|test  |     at Module.Mp._compile (/var/meteor/bundle/programs/server/runtime.js:50:23)
0|test  |     at Object.Module._extensions..js (module.js:664:10)
0|test  |     at Module.load (module.js:566:32)
0|test  |     at Module.Mp.load (/var/meteor/bundle/programs/server/runtime.js:15:31)
0|test  |     at tryModuleLoad (module.js:506:12)
0|test  |     at Function.Module._load (module.js:498:3)
0|test  |     at Module.require (module.js:597:17)
0|test  |     at Module.Hook._require.Module.require (/usr/local/lib/node_modules/pm2/node_modules/require-in-the-middle/index.js:80:39)
0|test  |     at require (internal/module.js:11:18)
0|test  |     at npmRequire (/var/meteor/bundle/programs/server/npm-require.js:133:12)
0|test  |     at Module.useNode (packages/modules-runtime.js:664:18)
0|test  |     at index.js (packages/modules.js:910:8)
0|test  |     at fileEvaluate (packages/modules-runtime.js:336:7)
0|test  |     at Module.require (packages/modules-runtime.js:238:14)
0|test  |     at require (packages/modules-runtime.js:258:21)
0|test  |     at segfault-handler.js (startup/server/segfault-handler.js:1:25)
0|test  |     at fileEvaluate (packages/modules-runtime.js:336:7)
0|test  |     at Module.require (packages/modules-runtime.js:238:14)
0|test  |     at require (packages/modules-runtime.js:258:21)
0|test  |     at /var/meteor/bundle/programs/server/app/app.js:44515:1
0|test  |     at /var/meteor/bundle/programs/server/boot.js:398:38
0|test  |     at Array.forEach (<anonymous>)
0|test  |     at /var/meteor/bundle/programs/server/boot.js:226:21
0|test  | Note: you are using a pure-JavaScript implementation of bcrypt.
0|test  | While this implementation will work correctly, it is known to be
0|test  | approximately three times slower than the native implementation.
0|test  | In order to use the native implementation instead, run
0|test  |   meteor npm install --save bcrypt
0|test  | in the root directory of your application.

1 Like