Strapi SEO plugin: reading 'collectionTypes' of null
Strapi Community SEO plugin throwing "Cannot read properties of null (reading 'collectionTypes')"? The reported cause, the v2.1.1 fix and the steps to apply it.
The Liite team6 dk okuma
Short answer
The plugin moved from the @strapi npm namespace to @strapi-community, and the maintainer says v2.1.1 fixes this error. Install v2.1.1 or later from the @strapi-community scope, remove any old @strapi copy, then rebuild the admin panel and hard refresh the browser.
You installed the Strapi Community SEO plugin, opened the admin panel, and got a TypeError instead of your content. The message reads:
Cannot read properties of null (reading 'collectionTypes')
Why it happens
The message itself is generic JavaScript. Some code tried to read collectionTypes from a value that was null. On its own, that does not say which value was missing.
The cause reported by people on the Strapi subreddit (as of December 2025) is the namespace move. The plugin used to be published under @strapi and now lives under @strapi-community. The maintainer is reported to have said that this change triggered the error and that v2.1.1 fixes it. We have not found that confirmed in an official changelog, so treat it as the most likely cause, not a proven one.
We also cannot say which lookup inside the plugin returns the null. Guessing at its internals would not help you, so the steps below stick to what you can check in your own project.
| Likely cause | What you see | Fix |
|---|---|---|
Old @strapi package still installed | Error as soon as the admin loads | Install the @strapi-community package, remove the old one |
| Plugin older than v2.1.1 | Same error after the rename | Update to v2.1.1 or later |
| Stale admin build | Error persists after updating | Rebuild the admin, hard refresh |
| Stale lockfile entry | Old version keeps coming back | Reinstall from a clean state |
| Two copies of the plugin | Conflicts or odd behavior | Keep one copy only |
Step-by-step fixes
Commit your work or back up the project first, then go in this order.
Fix 1: Install the renamed package
- See what is installed. Open
package.jsonand find the SEO plugin underdependencies. Note the exact package name and version. Runningnpm lsshows what is actually innode_modules. - Install v2.1.1 or later from the
@strapi-communityscope. Use your package manager (npm, yarn or pnpm). Copy the package name from the plugin's npm or GitHub page instead of typing it from memory. - Uninstall the old package. If a package under the old
@strapiscope is still listed, remove it so only the renamed plugin remains.
Back up first
Swapping plugin packages can touch lockfiles and plugin config. Commit or back up your project and database before you start.
Fix 2: Check how the plugin is registered
- Open your plugins config file, usually
config/plugins.jsorconfig/plugins.ts. - Look for any entry or
requirethat still points at the old name. - Follow the plugin's README for the exact key it expects, and update the entry to match.
Fix 3: Reinstall from a clean state
- Delete
node_modules. - If you are comfortable doing so, delete your lockfile too. A stale lockfile entry can keep an old version pinned.
- Install again with your package manager.
Fix 4: Rebuild the admin panel
- Run
strapi build(or your project'snpm run buildscript). - Start Strapi again.
- Press Ctrl+Shift+R (Cmd+Shift+R on a Mac) so the browser does not serve the previous admin bundle.
The admin UI is a built bundle, so the old code can keep running until you rebuild.
Still seeing it?
If the error survives every step, delete the admin build and cache folders your Strapi version generates, then run the build again.
Checklist before you try again
- Only one SEO plugin appears in
npm ls. - That plugin is under
@strapi-communityand is v2.1.1 or later. - No
@strapicopy remains inpackage.jsonor the lockfile. - The plugins config file refers to the renamed plugin.
- You ran a fresh admin build, not just a server restart.
- The browser was hard refreshed.
What won't help
- Adding
collectionTypesto your content types. The null comes from inside the plugin, not from a field missing in your models. - Only restarting the server. Without a rebuild, the admin panel can load the same bundle and show the same error.
- Keeping the old package and patching it. The maintainer's fix is described for the renamed package, so patching the old one means working on code that has moved.
If it still fails on v2.1.1 or later
Plugin versions keep moving, and the same message can come from a different cause.
- Read the plugin's README and release notes for the Strapi version it supports. A mismatch between the plugin and your Strapi major version is a common reason for plugins to break in the admin panel.
- Run
npm lsagain and confirm there is only one SEO plugin in the tree. - Search the plugin's GitHub issue tracker for the exact error text. If nothing matches, open an issue.
Include these details:
- Strapi version, plugin version and Node version
- The full stack trace from the browser console or server log
- Whether it happens on a fresh admin build
- What you already tried from this article
Hi, after installing the Strapi Community SEO plugin (version X.Y.Z, package @strapi-community/...) on Strapi X.Y.Z with Node X, the admin panel shows:
Cannot read properties of null (reading 'collectionTypes')
I removed the old @strapi package, reinstalled from a clean node_modules, ran a fresh admin build and hard refreshed the browser. The error still appears. Stack trace attached. Is there a known fix or a version I should pin?Common questions
Is this a bug in Strapi itself?
In the thread we found, the reported cause was the plugin's namespace move, not Strapi's core. Nobody there blamed Strapi.
Will I lose my SEO data if I change packages?
We can't confirm that from the evidence we have. Back up your database before swapping plugins, and check the plugin's README for migration notes.
Should I just remove the plugin?
If all you need is a title and description per page, you can add those fields to your content types yourself. That is more to maintain, so updating the package is the quicker first try.
Why does the error mention collectionTypes if my models are fine?
The message only says some code read that property from a null value. Reports point to the plugin's own lookup failing after the rename, not to anything in your content types.