0

Strapi Error

I am trying to deploy a Strapi app to Heroku. I have set APP_KEYS and JWT_SECRET config vars in Heroku. I have also added this code to plugins.js as stated in this question. But I am still getting this error (see image). Can anyone help with this?

const crypto = require("crypto");

module.exports = ({ env }) => ({
  "users-permissions": {
    config: {
      jwtSecret: env("JWT_SECRET") || crypto.randomBytes(16).toString("base64"),
    },
  },
});
George Garman
  • 83
  • 1
  • 6
  • I cannot see any image/error. Did you set your environment variable `JWT_SECRET`? – Gorgsenegger Oct 17 '22 at 08:11
  • You can find the image in the Strapi Error link at the top no? I have added the JWT_SECRET in the config vars in Heroku yes – George Garman Oct 19 '22 at 15:15
  • I didn't see the link above, maybe include the image directly in your question. As for the error: Could you try and see what happens when you hard-code a `jwtSecret` string (just for testing purposes), e.g.: `jwtSecret: "MyJwtSecret1234"`? – Gorgsenegger Oct 21 '22 at 05:57

0 Answers0