facebook/react · error · Error

102

102

Error message

EventPluginRegistry: Cannot inject two different event plugins using the same name, `${pluginName}`.

What it means

Error "EventPluginRegistry: Cannot inject two different event plugins using the same name, `${pluginName}`." thrown in facebook/react.

Source

Thrown at packages/react-native-renderer/src/legacy-events/EventPluginRegistry.js:252

 *
 * @param {object} injectedNamesToPlugins Map from names to plugin modules.
 * @internal
 */
export function injectEventPluginsByName(
  injectedNamesToPlugins: NamesToPlugins,
): void {
  let isOrderingDirty = false;
  for (const pluginName in injectedNamesToPlugins) {
    if (!injectedNamesToPlugins.hasOwnProperty(pluginName)) {
      continue;
    }
    const pluginModule = injectedNamesToPlugins[pluginName];
    if (
      !namesToPlugins.hasOwnProperty(pluginName) ||
      namesToPlugins[pluginName] !== pluginModule
    ) {
      if (namesToPlugins[pluginName]) {
        throw new Error(
          'EventPluginRegistry: Cannot inject two different event plugins ' +
            `using the same name, \`${pluginName}\`.`,
        );
      }

      namesToPlugins[pluginName] = pluginModule;
      isOrderingDirty = true;
    }
  }
  if (isOrderingDirty) {
    recomputePluginOrdering();
  }
}

View on GitHub (pinned to eafeac097b)

When it happens

Trigger: Thrown at packages/react-native-renderer/src/legacy-events/EventPluginRegistry.js:252 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of facebook/react@eafeac097b (2026-08-21). Data as JSON: /api/errors/dd885bad2caccf79. Report an issue: GitHub.