Strapi TypeError: Cannot read property 'register' of undefined

System Information
  • Strapi Version: 3.4.5
  • Operating System: Windows 10
  • Database: MongoDB atlas
  • Node Version: v12.18.4
  • NPM Version: 6.14.11
  • Yarn Version:

Locally, the app is running, I just added a new model and when I deployed it, it has this error. I looked for the’/app/node_modules/strapi-connector-mongoose/lib/migrations/index.js:6:24’ directory, but I cannot find it. What are the possible issues here?

3 Likes

The same problem is happening to me. Have you found a solution yet?

Did you manage to solve it Christine?

We do have the same problem with the latest versions of Strapi and connector. Any news on that?

There was another forum thread about this also:

Most likely you have a miss-matched version or you have an outdated package cached in a package-lock.json or yarn.lock file.

1 Like

thanks for the quick answer removing node_modules und reinstall fixed this issue.

1 Like

Ideally you should do this on any version upgrade, especially if you are using npm and not yarn. NPM is notorious for using outdated cached packages and not properly updating node_modules.

1 Like

Same for me. It works now :grinning:

How did you do it?

I removed node_modules and yarn install but still happens :frowning:

make sure you delete the lock files

I removed both nod_modules and package-lock.json file. and run npm install again. But getting same problem