"The model users-permissions can't be found."

System Information
  • Strapi Version: 3.6.5
  • Operating System: MacOS 11.4
  • Database: SQL
  • Node Version: 14.17.0
  • NPM Version: 6.14.13

Hey there,

I wanted to have a function to change the password by passing the old password and a new one. For that, I found this solution from yohanes. Unfortunately, if I want to execute the POST request, I get the error "Error: The model users-permissions can’t be found. It’s coming from this piece of code:
const user = await strapi.query('user', 'users-permissions').findOne({ email: params.identifier });.
This is the first out of maximum three times I need to use the users-permissions plugin and I am pretty sure this error will occur at the other usages as well.

Is there anyone who is able to help me?
Have a great day!

Lucas

1 Like