Npm start stopped working after npm install --save forest-express-sequelize@latest

When I started Forest liana thru npm start to be able to access my database in forestadmin inside the development area I saw a message saying that a newer version of Liana exists and that I should do CLI npm install --save forest-express-sequelize@latest.

After doing this npm start started throwing an error. I thought I could undo what I did by unchecking the changes inside package.json and package-lock.json with git, but that doesn’t seem to help. I tried uninstalling forest-express-sequelize, but that didn’t work either. It’s really frustrating, could someone help me get out of this?

Expected behavior

After entering CLI npm start a node server should start just like this:

Actual behavior

When I enter npm start I get this instead:

git:(master) ✗ npm start

> ibiza-garden-houses@0.0.1 start
> node ./server.js

/Users/owenmoss/code/OKMantis/ibz_garden_houses/Ibiza Garden Houses/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 (/Users/owenmoss/code/OKMantis/ibz_garden_houses/Ibiza Garden Houses/node_modules/express-jwt/lib/index.js:22:34)
    at Object.<anonymous> (/Users/owenmoss/code/OKMantis/ibz_garden_houses/Ibiza Garden Houses/app.js:36:9)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)
    at Object.<anonymous> (/Users/owenmoss/code/OKMantis/ibz_garden_houses/Ibiza Garden Houses/server.js:5:13)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47
npm ERR! code 1
npm ERR! path /Users/owenmoss/code/OKMantis/ibz_garden_houses/Ibiza Garden Houses
npm ERR! command failed
npm ERR! command sh -c node ./server.js

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/owenmoss/.npm/_logs/2021-01-27T19_14_09_888Z-debug.log

The server isn’t working.

Context

Please provide any relevant information about your setup.

package.json

{
  "name": "ibiza-garden-houses",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node ./server.js"
  },
  "dependencies": {
    "body-parser": "1.19.0",
    "chalk": "~1.1.3",
    "cookie-parser": "1.4.4",
    "cors": "2.8.5",
    "debug": "~4.0.1",
    "dotenv": "~6.1.0",
    "express": "~4.16.3",
    "express-jwt": "6.0.0",
    "forest-express": "^7.4.0",
    "forest-express-sequelize": "^6.0.0",
    "morgan": "1.9.1",
    "pg": "~8.2.2",
    "require-all": "^3.0.0",
    "sequelize": "~5.15.1"
  }
}

1 Like

Hi @OKMantis and welcome to our community :wave:

Please check this post and follow the quick steps to downgrade express-jwt

Let me know if it solves it for you :slight_smile:

Thanks you @anon20071947, it worked!

1 Like