how to fix aws elastic bean stalk 502 gateway issue

Recently, I am deploying my local node js on AWS elasticBean.

All the pipeline loading showed success (deployment success)

But I got an 502 gateway issue.

I have checked the log and no clues what it was.

So, I guess it may be node js version problem, but I am not sure. So I would like to ask first before trying.

This is my local terminal about the npm and node

enter image description here

This is the screenshot of my elasticBean env

enter image description here

This is the problem

enter image description here

This is the log, I have uploaded all node module on github as well, so I am sure module was on there

Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR! code ELIFECYCLE
Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR! errno 1
Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR! project1@1.0.0 start: `node index.js`
Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR! Exit status 1
Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR!
Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR! Failed at the project1@1.0.0 start script.
Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR! A complete log of this run can be found in:
Jan 19 15:44:01 ip-172-30-32-227 web: npm ERR!     /home/webapp/.npm/_logs/2022-01-19T15_44_01_062Z-debug.log
Jan 19 15:44:01 ip-172-30-32-227 web: > project1@1.0.0 start /var/app/current
Jan 19 15:44:01 ip-172-30-32-227 web: > node index.js
Jan 19 15:44:01 ip-172-30-32-227 web: db url:
Jan 19 15:44:01 ip-172-30-32-227 web: mongodb+srv://project1:haha1234@cluster0.52qwk.mongodb.net/test
Jan 19 15:44:02 ip-172-30-32-227 web: internal/modules/cjs/loader.js:1144
Jan 19 15:44:02 ip-172-30-32-227 web: return process.dlopen(module, path.toNamespacedPath(filename));
Jan 19 15:44:02 ip-172-30-32-227 web: ^
Jan 19 15:44:02 ip-172-30-32-227 web: Error: /var/app/current/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: invalid ELF header
Jan 19 15:44:02 ip-172-30-32-227 web: at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
Jan 19 15:44:02 ip-172-30-32-227 web: at Module.load (internal/modules/cjs/loader.js:950:32)
Jan 19 15:44:02 ip-172-30-32-227 web: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
Jan 19 15:44:02 ip-172-30-32-227 web: at Module.require (internal/modules/cjs/loader.js:974:19)
Jan 19 15:44:02 ip-172-30-32-227 web: at require (internal/modules/cjs/helpers.js:93:18)
Jan 19 15:44:02 ip-172-30-32-227 web: at Object.<anonymous> (/var/app/current/node_modules/bcrypt/bcrypt.js:6:16)
Jan 19 15:44:02 ip-172-30-32-227 web: at Module._compile (internal/modules/cjs/loader.js:1085:14)
Jan 19 15:44:02 ip-172-30-32-227 web: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
Jan 19 15:44:02 ip-172-30-32-227 web: at Module.load (internal/modules/cjs/loader.js:950:32)
Jan 19 15:44:02 ip-172-30-32-227 web: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
Jan 19 15:44:02 ip-172-30-32-227 web: at Module.require (internal/modules/cjs/loader.js:974:19)
Jan 19 15:44:02 ip-172-30-32-227 web: at require (internal/modules/cjs/helpers.js:93:18)
Jan 19 15:44:02 ip-172-30-32-227 web: at Object.<anonymous> (/var/app/current/routes/registerRoutes.js:5:16)
Jan 19 15:44:02 ip-172-30-32-227 web: at Module._compile (internal/modules/cjs/loader.js:1085:14)
Jan 19 15:44:02 ip-172-30-32-227 web: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
Jan 19 15:44:02 ip-172-30-32-227 web: at Module.load (internal/modules/cjs/loader.js:950:32) {
Jan 19 15:44:02 ip-172-30-32-227 web: code: 'ERR_DLOPEN_FAILED'
Jan 19 15:44:02 ip-172-30-32-227 web: }
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR! code ELIFECYCLE
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR! errno 1
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR! project1@1.0.0 start: `node index.js`
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR! Exit status 1
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR!
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR! Failed at the project1@1.0.0 start script.
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR! A complete log of this run can be found in:
Jan 19 15:44:02 ip-172-30-32-227 web: npm ERR!     /home/webapp/.npm/_logs/2022-01-19T15_44_02_097Z-debug.log

Below is the log file structure in case it helps

enter image description here

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum