Hello there!
As I am getting this yellow top banner telling my project will soon (june 30th) stop working (depreciated), I got into the upgrade of it
As stated in a previous post, I translated a part of my project into Typescript and everything was working well. However, updating my work to v7 has been a tough job and so, I decided to update Lumber (I had a version from 2019 installed on my machine) to the latest release and create a fresh new project (in order to generate brand new sources)
I started to import all my code. Of course I had to rewrite some (mostly models approach) but otherwise, it was mostly overriding existing code (app.js, server.js, middlewares/*, etc)
Expected behavior
When I start my program, i would like it to work xD
Actual behavior
I am getting something quite weird which seems to be related to jwt
----------------------
[11:57:03 PM] Starting compilation in watch mode...
[11:57:22 PM] Found 0 errors. Watching for file changes.
[nodemon] 2.0.7
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): dist\**\*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./dist/server.js`
C:\.........\project\node_modules\express-jwt\lib\index.js:22
if (!options.algorithms) throw new Error('algorithms should be set');
^
Error: algorithms should be set
at module.exports (C:\.........\project\node_modules\express-jwt\lib\index.js:22:34)
at Object.<anonymous> (C:\.........\project\dist\app.js:31:9)
Context
Please provide any relevant information about your setup.
"dependencies": {
"@types/express": "^4.17.11",
"@types/forest-express-mongoose": "^7.5.0",
"@types/mongoose": "^5.10.5",
"axios": "^0.21.1",
"body-parser": "1.19.0",
"chalk": "~4.1.1",
"cookie-parser": "1.4.5",
"cors": "2.8.5",
"debug": "~4.3.1",
"dotenv": "~9.0.2",
"express": "~4.17.1",
"express-jwt": "6.0.0",
"forest-express-mongoose": "^7.6.0",
"mongoose": "~5.12.9",
"morgan": "1.10.0",
"nodemon": "^2.0.7",
"require-all": "^3.0.0",
"tsc-watch": "^4.2.9",
"typescript": "^4.2.4"
}
Maybe it’s all about giving an algorithm parameter to jwt at initialisation but I don’t even know which one to put so…
Let me know if you need more info
Thanks!
Best,
Max