Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expressJWT is not a function - error #7

Open
Craig-jem opened this issue Jan 4, 2023 · 0 comments
Open

expressJWT is not a function - error #7

Craig-jem opened this issue Jan 4, 2023 · 0 comments

Comments

@Craig-jem
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant