Problem on Heroku - "jwtSecret ('JWT_SECRET')" by overwrite "plugin-users-permissions" šŸ«¤

System Information
  • Strapi Version: 4.21.1
  • Operating System: Heroku
  • Database: PostgreSQL
  • Node Version: 18.20.0
  • NPM Version: >=6.0.0

Hello guys,

I have a small issue hereā€¦ :face_with_diagonal_mouth:

To override ā€œplugin-users-permissionsā€, I just copied the entire folder and renamed it to ā€œusers-permissionsā€ for testing purposes. I havenā€™t made any changes to anything inside it, and I can debug everything in the folder without any problems. It runs perfectly fine on my local machine.

However, when I try to deploy the project on Heroku, it throws an error! (please see the screenshot)

If I add ā€˜jwtSecretā€™ in the ā€˜plugin.jsā€™ file, it still doesnā€™t work.

What can I do? I need your help!

Many thanks in advance!

Originally I modified the ā€œauth.jsā€ and ā€œuser.jsā€ and added a few new ā€œmiddlewaresā€. When I still had Strapi v3, it worked so easily, but with Strapi v4 I would like to use these files and this structure even further.

image

Hello guys,

in the meantime, Iā€™ve managed a lot myself, and Iā€™ve also bound the files using ā€œstrapi-server.jsā€. Now I just have to overwrite the two files ā€œauth.jsā€ and ā€œuser.jsā€ (in ā€œcontrollersā€).

image

Can someone give me a tip?

Thanks in advance!

P.S. ā€œI have asked a question about this. If it can be resolved, then this issue will also be resolved.ā€