{"record":{"id":"5c3bc8faccff4d01","repo":"parcel-bundler/parcel","slug":"cannot-find-parcel-plugin-pluginname","errorCode":null,"errorMessage":"Cannot find Parcel plugin \"${pluginName}\"","messagePattern":"Cannot find Parcel plugin \"(.+?)\"","errorType":"exception","errorClass":"ThrowableDiagnostic","httpStatus":null,"severity":"error","filePath":"packages/core/core/src/loadParcelPlugin.js","lineNumber":152,"sourceCode":"        range,\n      },\n    ));\n  } catch (err) {\n    if (err.code !== 'MODULE_NOT_FOUND') {\n      throw err;\n    }\n\n    if (isOptional) {\n      return null;\n    }\n\n    let configContents = await options.inputFS.readFile(configPath, 'utf8');\n    let alternatives = await findAlternativeNodeModules(\n      options.inputFS,\n      pluginName,\n      path.dirname(resolveFrom),\n    );\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: md`Cannot find Parcel plugin \"${pluginName}\"`,\n        origin: '@parcel/core',\n        codeFrames: keyPath\n          ? [\n              {\n                filePath: configPath,\n                language: 'json5',\n                code: configContents,\n                codeHighlights: generateJSONCodeHighlights(configContents, [\n                  {\n                    key: keyPath,\n                    type: 'value',\n                    message: md`Cannot find module \"${pluginName}\"${\n                      alternatives[0]\n                        ? `, did you mean \"${alternatives[0]}\"?`\n                        : ''\n                    }`,","sourceCodeStart":134,"sourceCodeEnd":170,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/loadParcelPlugin.js#L134-L170","documentation":"Parcel could not resolve the named plugin module from the config's location. Before throwing, it queries `findAlternativeNodeModules` for similar names and attaches a code frame from the `.parcelrc`. This typically means a typo, a missing install, or a package not resolvable from the config's directory.","triggerScenarios":"A `.parcelrc`/config package references a plugin name that does not resolve via Node resolution from the config path, and the plugin is not optional.","commonSituations":"Misspelled plugin name; plugin is a devDependency that wasn't installed; wrong npm scope; resolvable from one workspace but not another.","solutions":["Install the plugin: `npm install <plugin-name>` (or add to devDependencies).","Check the spelling and npm scope against the suggested alternatives in the diagnostic.","If the plugin is intentionally absent, mark it optional via `optionalParcelDependencies`."],"exampleFix":"// before\n$ npm run build  # Cannot find Parcel plugin \"@parcrl/transformer-js\"\n\n// after\n$ npm install -D @parcel/transformer-js","handlingStrategy":"validation","validationCode":"// Pre-resolve the plugin from the config path before building.\ntry {\n  await require.resolve(pluginName, {paths: [path.dirname(configPath)]});\n} catch {\n  throw new Error(`install ${pluginName} or fix the name`);\n}","typeGuard":"async function isResolvable(name: string, from: string): Promise<boolean> {\n  try { await require.resolve(name, {paths: [from]}); return true; }\n  catch { return false; }\n}","tryCatchPattern":null,"preventionTips":["Install plugins as devDependencies in the same workspace as the config.","Double-check the npm scope and spelling.","Use the suggested alternatives in the diagnostic when unsure."],"tags":["plugin","resolution","parcelrc"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}