dsod-paris / express-js-appbundle

0 stars 1 forks source link

Missing dependency `express-session` #2

Open tgrall opened 1 week ago

tgrall commented 1 week ago

When following the installation steps :

npm install

npm start

I got the following error

npm start

> froghome@1.0.0 start
> node server.js

Server is listening on port 3000
node:internal/modules/cjs/loader:1228
  throw err;
  ^

Error: Cannot find module 'express-session'
Require stack:
- /workspaces/express-js-appbundle/server.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1225:15)
    at Module._load (node:internal/modules/cjs/loader:1051:27)
    at Module.require (node:internal/modules/cjs/loader:1311:19)
    at require (node:internal/modules/helpers:179:18)
    at Object.<anonymous> (/workspaces/express-js-appbundle/server.js:26:15)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [ '/workspaces/express-js-appbundle/server.js' ]
}

Node.js v20.17.0

@fgibelin : is that expected, should we update the dependencies in package ?

fgibelin commented 1 week ago

I see you are running Node.js v20.17.0 This module needs Node.js v18

The action runs: node: v18.20.4 npm: 10.7.0 yarn: 1.22.22

tgrall commented 1 week ago

@fgibelin sure, but I doubt this is the issue, the application code is not complete :

Not a big deal for the demo, since we only build, but the application does not start. I will fix it in a separate branch just in case. (where I will do the Secret Scanning Push Protection demo)