Deploying express.js / node.js app to Heroku. I am getting error and in desperate state

I have built front end project for my school delivery and been using express.js and using firebase to store data.

Now that I am kind of done for web, I want to deploy it so my teacher can see the website.

I tried it on netlify, the page showing but without anything from firebase displaying. I was told by someone that netlify will not work with dynamic and only with static.

So heroku was suggestion I was given and I tried it and it comes up application error.

I am trying to follow the heroku logs --tail but having no luck.

I really need someone to help me with this and tell me what to do. I have been searching for answer for 3-4 days with no luck and having a panic since delivery is tomorrow.

I would pay anyone here if you could look into my code and see what can be done to have it show up on heroku, netlify, vercel wherever.

I have made Procfile I have const express = require(“express”);

at the end of my server.js file, i have written:

let port = process.env.PORT || 3000;

app.listen(port, () => {
  console.log(`listening on port ${port}`);
});

Below here is the "Application error" log. I would private message the github to anyone who got the time to help me out with this. I have tried different methods and cant get this to work.

daniers-mbp:semesterProject-DanierValiev-2021 daniervaliev$ heroku logs --tail
2021-12-18T20:34:59.823895+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:93:18)
2021-12-18T20:34:59.823895+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/bcrypt/bcrypt.js:6:16)
2021-12-18T20:34:59.823895+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1085:14)
2021-12-18T20:34:59.823895+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
2021-12-18T20:34:59.823898+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:950:32)
2021-12-18T20:34:59.823898+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
2021-12-18T20:34:59.823899+00:00 app[web.1]: code: 'ERR_DLOPEN_FAILED'
2021-12-18T20:34:59.823899+00:00 app[web.1]: }
2021-12-18T20:34:59.831112+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-12-18T20:34:59.831293+00:00 app[web.1]: npm ERR! errno 1
2021-12-18T20:34:59.834995+00:00 app[web.1]: npm ERR! school-project@1.0.0 start: `node server.js`
2021-12-18T20:34:59.835040+00:00 app[web.1]: npm ERR! Exit status 1
2021-12-18T20:34:59.835098+00:00 app[web.1]: npm ERR!
2021-12-18T20:34:59.835137+00:00 app[web.1]: npm ERR! Failed at the school-project@1.0.0 start script.
2021-12-18T20:34:59.835173+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-12-18T20:34:59.844166+00:00 app[web.1]: 
2021-12-18T20:34:59.844277+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-12-18T20:34:59.844320+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-12-18T20_34_59_835Z-debug.log
2021-12-18T20:34:59.968145+00:00 heroku[web.1]: Process exited with status 1
2021-12-18T20:35:00.043561+00:00 heroku[web.1]: State changed from starting to crashed
2021-12-18T20:35:01.199338+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=semester-project-2021.herokuapp.com request_id=41f8f7fc-b38b-47c2-a74c-794aab2caac1 fwd="217.197.166.66" dyno= connect= service= status=503 bytes= protocol=https
2021-12-18T20:35:01.740036+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=semester-project-2021.herokuapp.com request_id=def1268c-e9a7-4b2a-b656-f601cf5c1bea fwd="217.197.166.66" dyno= connect= service= status=503 bytes= protocol=https
2021-12-18T20:35:03.939499+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=semester-project-2021.herokuapp.com request_id=6cb17bce-2faf-466d-9ce8-8804f6e0d31c fwd="217.197.166.66" dyno= connect= service= status=503 bytes= protocol=https
2021-12-18T20:35:04.316438+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=semester-project-2021.herokuapp.com request_id=cdf07873-1871-4a34-a37f-8090c7534d66 fwd="217.197.166.66" dyno= connect= service= status=503 bytes= protocol=https
2021-12-18T20:48:12.000000+00:00 app[api]: Build started by user danier-1995@hotmail.com
2021-12-18T20:48:46.286574+00:00 app[api]: Release v6 created by user danier-1995@hotmail.com
2021-12-18T20:48:46.286574+00:00 app[api]: Deploy 81de36df by user danier-1995@hotmail.com
2021-12-18T20:48:47.466332+00:00 heroku[web.1]: State changed from crashed to starting
2021-12-18T20:48:49.000000+00:00 app[api]: Build succeeded
2021-12-18T20:48:58.556787+00:00 heroku[web.1]: Starting process with command `npm start`
2021-12-18T20:48:59.574389+00:00 app[web.1]: 
2021-12-18T20:48:59.574402+00:00 app[web.1]: > school-project@1.0.0 start /app
2021-12-18T20:48:59.574402+00:00 app[web.1]: > node server.js
2021-12-18T20:48:59.574402+00:00 app[web.1]: 
2021-12-18T20:48:59.777752+00:00 app[web.1]: internal/modules/cjs/loader.js:1144
2021-12-18T20:48:59.777753+00:00 app[web.1]: return process.dlopen(module, path.toNamespacedPath(filename));
2021-12-18T20:48:59.777754+00:00 app[web.1]: ^
2021-12-18T20:48:59.777754+00:00 app[web.1]: 
2021-12-18T20:48:59.777755+00:00 app[web.1]: Error: /app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: invalid ELF header
2021-12-18T20:48:59.777755+00:00 app[web.1]: at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
2021-12-18T20:48:59.777756+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:950:32)
2021-12-18T20:48:59.777756+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
2021-12-18T20:48:59.777756+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:974:19)
2021-12-18T20:48:59.777757+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:93:18)
2021-12-18T20:48:59.777757+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/bcrypt/bcrypt.js:6:16)
2021-12-18T20:48:59.777757+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1085:14)
2021-12-18T20:48:59.777758+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
2021-12-18T20:48:59.777758+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:950:32)
2021-12-18T20:48:59.777758+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
2021-12-18T20:48:59.777759+00:00 app[web.1]: code: 'ERR_DLOPEN_FAILED'
2021-12-18T20:48:59.777759+00:00 app[web.1]: }
2021-12-18T20:48:59.787354+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-12-18T20:48:59.787558+00:00 app[web.1]: npm ERR! errno 1
2021-12-18T20:48:59.791136+00:00 app[web.1]: npm ERR! school-project@1.0.0 start: `node server.js`
2021-12-18T20:48:59.791177+00:00 app[web.1]: npm ERR! Exit status 1
2021-12-18T20:48:59.791227+00:00 app[web.1]: npm ERR!
2021-12-18T20:48:59.791267+00:00 app[web.1]: npm ERR! Failed at the school-project@1.0.0 start script.
2021-12-18T20:48:59.791311+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-12-18T20:48:59.797070+00:00 app[web.1]: 
2021-12-18T20:48:59.797150+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-12-18T20:48:59.797200+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-12-18T20_48_59_791Z-debug.log
2021-12-18T20:48:59.922367+00:00 heroku[web.1]: Process exited with status 1
2021-12-18T20:48:59.966806+00:00 heroku[web.1]: State changed from starting to crashed
2021-12-18T20:49:00.074570+00:00 heroku[web.1]: State changed from crashed to starting
2021-12-18T20:49:04.921133+00:00 heroku[web.1]: Starting process with command `npm start`
2021-12-18T20:49:06.413832+00:00 app[web.1]: 
2021-12-18T20:49:06.413845+00:00 app[web.1]: > school-project@1.0.0 start /app
2021-12-18T20:49:06.413845+00:00 app[web.1]: > node server.js
2021-12-18T20:49:06.413846+00:00 app[web.1]: 
2021-12-18T20:49:06.606205+00:00 app[web.1]: internal/modules/cjs/loader.js:1144
2021-12-18T20:49:06.606207+00:00 app[web.1]: return process.dlopen(module, path.toNamespacedPath(filename));
2021-12-18T20:49:06.606207+00:00 app[web.1]: ^
2021-12-18T20:49:06.606208+00:00 app[web.1]: 
2021-12-18T20:49:06.606208+00:00 app[web.1]: Error: /app/node_modules/bcrypt/lib/binding/napi-v3/bcrypt_lib.node: invalid ELF header
2021-12-18T20:49:06.606208+00:00 app[web.1]: at Object.Module._extensions..node (internal/modules/cjs/loader.js:1144:18)
2021-12-18T20:49:06.606209+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:950:32)
2021-12-18T20:49:06.606211+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:790:12)
2021-12-18T20:49:06.606211+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:974:19)
2021-12-18T20:49:06.606211+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:93:18)
2021-12-18T20:49:06.606212+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/bcrypt/bcrypt.js:6:16)
2021-12-18T20:49:06.606212+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1085:14)
2021-12-18T20:49:06.606212+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
2021-12-18T20:49:06.606213+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:950:32)
2021-12-18T20:49:06.606213+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:790:12) {
2021-12-18T20:49:06.606213+00:00 app[web.1]: code: 'ERR_DLOPEN_FAILED'
2021-12-18T20:49:06.606213+00:00 app[web.1]: }
2021-12-18T20:49:06.614298+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-12-18T20:49:06.614453+00:00 app[web.1]: npm ERR! errno 1
2021-12-18T20:49:06.617900+00:00 app[web.1]: npm ERR! school-project@1.0.0 start: `node server.js`
2021-12-18T20:49:06.617945+00:00 app[web.1]: npm ERR! Exit status 1
2021-12-18T20:49:06.617998+00:00 app[web.1]: npm ERR!
2021-12-18T20:49:06.618042+00:00 app[web.1]: npm ERR! Failed at the school-project@1.0.0 start script.
2021-12-18T20:49:06.618079+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2021-12-18T20:49:06.620978+00:00 app[web.1]: 
2021-12-18T20:49:06.621044+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2021-12-18T20:49:06.621082+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2021-12-18T20_49_06_618Z-debug.log
2021-12-18T20:49:06.742349+00:00 heroku[web.1]: Process exited with status 1
2021-12-18T20:49:06.978235+00:00 heroku[web.1]: State changed from starting to crashed
2021-12-18T20:57:38.986909+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=semester-project-2021.herokuapp.com request_id=5d68fbe9-edd2-4e7f-b0e3-88f1ea815a3a fwd="217.197.166.66" dyno= connect= service= status=503 bytes= protocol=https
2021-12-18T20:57:39.394776+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=semester-project-2021.herokuapp.com request_id=ef5771e6-8283-45ad-bf77-1db793370c03 fwd="217.197.166.66" dyno= connect= service= status=503 bytes= protocol=https

I thank you all for your time reading this, if you have good experience with this, please reach out.