Strapi问题:安装插件后Custom Fields未显示
Strapi自定义字段插件无法在内容类型构建器中显示的问题
问题描述
- 安装multi-select等多款自定义字段插件后,插件在管理后台General->Plugins中可见,但在Content Type Builder创建新字段时,点击「Custom」选项看不到对应的自定义字段
- 操作全程无任何报错信息
当前依赖配置
"dependencies": { "@strapi/plugin-graphql": "4.5.0", "@strapi/plugin-i18n": "4.5.0", "@strapi/plugin-users-permissions": "4.5.0", "@strapi/strapi": "4.5.0", "better-sqlite3": "7.4.6", "dayjs": "^1.11.6", "deep-rename-keys": "^0.2.1", "deep-rename-keys-ts": "^1.0.1", "geographiclib": "^1.52.2", "geographiclib-geodesic": "^2.0.0", "graphql-type-json": "^0.3.2", "nexus": "^1.3.0", "pg": "^8.8.0", "strapi-plugin-country-select": "^1.0.0", "strapi-plugin-multi-select": "^1.1.0", "strapi-utils": "^3.6.11" }
排查与解决步骤
版本兼容性修复
- 依赖中包含
strapi-utils@3.6.11,这是Strapi v3版本的工具包,与当前v4版本冲突。执行以下命令移除该依赖并重新安装:npm uninstall strapi-utils npm install
- 依赖中包含
清理缓存并重建项目
- 清除Strapi缓存与构建文件,避免缓存导致的加载异常:
rm -rf node_modules/.cache build npm run build npm run develop
- 清除Strapi缓存与构建文件,避免缓存导致的加载异常:
验证插件注册状态
- 检查
config/plugins.js文件(不存在则新建),确认自定义字段插件已启用:module.exports = ({ env }) => ({ // 其他插件配置 'multi-select': { enabled: true, }, 'country-select': { enabled: true, }, }); - 保存配置后重启Strapi服务。
- 检查
清除浏览器缓存
- 使用无痕模式打开Strapi管理后台,或清除当前浏览器缓存后重新登录,验证自定义字段是否显示。
内容的提问来源于stack exchange,提问作者Daniel Roth
相关产品推荐
相关产品推荐

