{"record":{"id":"a1b3bbbff70d45d5","repo":"GrapesJS/grapesjs","slug":"plugin-explicitid-not-found","errorCode":null,"errorMessage":"Plugin ${explicitId} not found","messagePattern":"Plugin (.+?) not found","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/core/src/plugin_manager/index.ts","lineNumber":63,"sourceCode":"\n    const { plugin } = unwrapPluginMeta(target as Plugin<any>);\n    if (!isPluginFunction(plugin)) return;\n\n    return this.getAll().find((item) => item.get('plugin') === plugin);\n  }\n\n  private normalizePlugin(input: PluginInput, options: PluginOptions = {}) {\n    const descriptor = isPluginDescriptor(input) ? input : undefined;\n    const sourcePlugin = (descriptor ? descriptor.plugin : input) as string | Plugin<any>;\n    const explicitId = descriptor?.id || '';\n    const unwrapped = unwrapPluginMeta(sourcePlugin);\n    const resolvedPlugin = getPlugin(unwrapped.plugin);\n    let normalized;\n\n    if (!resolvedPlugin || !isPluginFunction(resolvedPlugin)) {\n      const pluginId = isString(unwrapped.plugin) ? unwrapped.plugin : getPluginId(unwrapped.plugin) || explicitId;\n      if (explicitId) {\n        throw new Error(`Plugin ${explicitId} not found`);\n      }\n      logPluginWarn(this.editor, pluginId || 'unknown');\n    } else {\n      const id = explicitId || this.resolvePluginId(sourcePlugin, resolvedPlugin);\n      normalized = {\n        id,\n        plugin: resolvedPlugin,\n        options: {\n          ...this.getConfigPluginOptions(id, sourcePlugin),\n          ...unwrapped.options,\n          ...options,\n        },\n      };\n    }\n\n    return normalized;\n  }\n","sourceCodeStart":45,"sourceCodeEnd":81,"githubUrl":"https://github.com/GrapesJS/grapesjs/blob/2bdeda85b82b8b9ceae42fd6558cbbcae5ec2d21/packages/core/src/plugin_manager/index.ts#L45-L81","documentation":"The plugin manager resolves plugins by id from registered plugins. If a plugin was added by explicit id (e.g. via `plugins: ['my-plugin']` with `pluginsOpts` or an explicit id) and cannot be resolved to a function plugin, it throws `Plugin ${id} not found` instead of just warning.","triggerScenarios":"Listing a plugin id in `grapesjs.init({ plugins: [...] })` that was never registered via `grapesjs.plugins.add(id, plugin)` nor imported and passed as a function; passing a string id whose npm package isn't loaded (e.g. missing import/CDN script).","commonSituations":"Forgetting to import the plugin module (global vs module builds), wrong plugin name casing, plugin package not installed, loading plugins on the server where the global isn't attached, GrapesJS v4 plugin API changes.","solutions":["Import the plugin and pass the function directly: `plugins: [myPlugin]` or `plugins: [[myPlugin, opts]]`.","Register by id first: `grapesjs.plugins.add('my-plugin', myPlugin)` then use the string id.","Verify the plugin package is installed/imported and the id spelling matches exactly.","Check the plugin supports your GrapesJS major version (v3 vs v4 plugin signature)."],"exampleFix":"// before\nconst editor = grapesjs.init({ plugins: ['gjs-blocks-basic'] }); // never registered\n// after\nimport blocksBasic from 'grapesjs-blocks-basic';\nconst editor = grapesjs.init({ plugins: [blocksBasic] });","handlingStrategy":"type-guard","validationCode":"const resolved = typeof plugin === 'string' ? grapesjs.plugins.get?.(plugin) : plugin;\nif (typeof resolved !== 'function') {\n  throw new Error(`Plugin ${plugin} is not loaded; import it or call grapesjs.plugins.add()`);\n}","typeGuard":"function isLoadedPlugin(p) {\n  return typeof p === 'function' || (Array.isArray(p) && typeof p[0] === 'function');\n}","tryCatchPattern":"try {\n  const editor = grapesjs.init({ plugins });\n} catch (err) {\n  const m = /Plugin (.+) not found/.exec(err.message);\n  if (m) console.error(`Import or register plugin \"${m[1]}\" before init`);\n  else throw err;\n}","preventionTips":["Pass imported plugin functions instead of string ids when possible","If using string ids, register them via grapesjs.plugins.add first","Pin plugin versions compatible with your GrapesJS major version","Check for missing script tags/imports in global (UMD) setups"],"tags":["grapesjs","plugins","missing-module","configuration"],"backgroundTag":"plugin-not-found","analyzedSha":"2bdeda85b82b8b9ceae42fd6558cbbcae5ec2d21","analyzedAt":"2026-08-30T11:47:52.267Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}