node-2fa-tutorial icon indicating copy to clipboard operation
node-2fa-tutorial copied to clipboard

expressJWT is not a function - error

Open Craig-jem opened this issue 2 years ago • 0 comments

virtual-machine:~/Documents/2fa-tutorial$ npm start

[email protected] start nodemon index.js

[nodemon] 2.0.20 [nodemon] to restart at any time, enter rs [nodemon] watching path(s): . [nodemon] watching extensions: js,mjs,json [nodemon] starting node index.js express-session deprecated undefined resave option; provide resave option index.js:14:9 express-session deprecated undefined saveUninitialized option; provide saveUninitialized option index.js:14:9 /home/craig/Documents/2fa-tutorial/index.js:71 const jwtMiddleware = expressJWT({ ^

TypeError: expressJWT is not a function at Object. (/home/craig/Documents/2fa-tutorial/index.js:71:23) at Module._compile (internal/modules/cjs/loader.js:999:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10) at Module.load (internal/modules/cjs/loader.js:863:32) at Function.Module._load (internal/modules/cjs/loader.js:708:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12) at internal/main/run_main_module.js:17:47 [nodemon] app crashed - waiting for file changes before starting...

[email protected] Linux Ubuntu 22.4

Could you please advise of possible fix for the TypeError

Thank you Craig

Craig-jem avatar Jan 04 '23 04:01 Craig-jem