[I want a solution for this error please and I installed npm express-session by the way
const session = require('express-session'); app.use(session({ secret: 'secret-key', resave: false, saveUninitialized: false, }));
and error is
TypeError: Cannot read properties of undefined (reading 'use') at Object. (D:\chrome downloads\network\network\myapp\app.js:42:5) at Module._compile (node:internal/modules/cjs/loader:1101:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47]1
You haven't defined app. You need to define it using const app = express().