Node Modules Missing Server Utils Export Error Fix

When I run my Strapi project using a version higher than 4.15.0, I get an error saying that “./server/utils” is not defined in “exports” in the file [project directory name]/node_modules/@strapi/plugin-users-permissions/package.json. However, I found a way to fix the error by actually filling in the missing definition. Under the “exports” section of the aforementioned JSON file, add the following code:

"./server/utils": {
  "source": "./server/utils/index.js",
  "require": "./server/utils/index.js",
  "default": "./server/utils/index.js"

Note that you will have to redo this any time you change the Strapi version as it regenerates the node modules. Same if you delete the node modules and reinstall them.

Thanks for sharing.

here is another solution

Sorry, this solution didn’t fix the issue for me.