{"record":{"id":"361603bbec92ce42","repo":"parcel-bundler/parcel","slug":"cannot-find-extended-parcel-config","errorCode":null,"errorMessage":"Cannot find extended parcel config","messagePattern":"Cannot find extended parcel config","errorType":"exception","errorClass":"ThrowableDiagnostic","httpStatus":null,"severity":"error","filePath":"packages/core/core/src/requests/ParcelConfigRequest.js","lineNumber":500,"sourceCode":"  ext: string,\n  configPath: FilePath,\n  extendsKey: string,\n  options: ParcelOptions,\n): Promise<FilePath> {\n  if (ext.startsWith('.')) {\n    return path.resolve(path.dirname(configPath), ext);\n  } else {\n    try {\n      let {resolved} = await options.packageManager.resolve(ext, configPath);\n      return options.inputFS.realpath(resolved);\n    } catch (err) {\n      let parentContents = await options.inputFS.readFile(configPath, 'utf8');\n      let alternatives = await findAlternativeNodeModules(\n        options.inputFS,\n        ext,\n        path.dirname(configPath),\n      );\n      throw new ThrowableDiagnostic({\n        diagnostic: {\n          message: `Cannot find extended parcel config`,\n          origin: '@parcel/core',\n          codeFrames: [\n            {\n              filePath: configPath,\n              language: 'json5',\n              code: parentContents,\n              codeHighlights: generateJSONCodeHighlights(parentContents, [\n                {\n                  key: extendsKey,\n                  type: 'value',\n                  message: md`Cannot find module \"${ext}\"${\n                    alternatives[0]\n                      ? `, did you mean \"${alternatives[0]}\"?`\n                      : ''\n                  }`,\n                },","sourceCodeStart":482,"sourceCodeEnd":518,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/ParcelConfigRequest.js#L482-L518","documentation":"Thrown by resolveExtends() when a non-relative extends specifier (not starting with '.') cannot be resolved as a Node module via packageManager.resolve(). The diagnostic shows the extends value in the parent config and suggests alternative module names using findAlternativeNodeModules.","triggerScenarios":"resolveExtends() is called for each entry in the extends array of .parcelrc. If the specifier doesn't start with '.', it's treated as a package name and resolved. When resolve() throws (module not found), the catch block builds a diagnostic with 'Cannot find module' and did-you-mean suggestions.","commonSituations":"Typo in the extends package name; package not installed (forgot npm install); package name changed after an upgrade; scoped package with missing @scope prefix; extends references a config that was renamed or deprecated.","solutions":["Install the missing config package: npm install --save-dev <package-name>.","Check the 'did you mean' suggestion in the diagnostic for the correct name.","Verify the exact package name on npm: npm view <package-name>.","If the package was renamed, update the extends field to the new name.","For scoped packages, ensure the @scope/ prefix is included."],"exampleFix":"// before — .parcelrc\n{\n  \"extends\": \"@parcel/config-defalt\"\n}\n\n// after\n{\n  \"extends\": \"@parcel/config-default\"\n}","handlingStrategy":"validation","validationCode":"const fs = require('fs');\nfunction validateExtendsPackageExists(parcelrcPath) {\n  const cfg = JSON.parse(fs.readFileSync(parcelrcPath, 'utf8'));\n  const extendsList = Array.isArray(cfg.extends) ? cfg.extends : cfg.extends ? [cfg.extends] : [];\n  for (const ext of extendsList) {\n    if (typeof ext === 'string' && !ext.startsWith('.')) {\n      try {\n        require.resolve(ext, { paths: [require('path').dirname(parcelrcPath)] });\n      } catch {\n        throw new Error(`Extends package \"${ext}\" is not installed. Run: npm install --save-dev ${ext}`);\n      }\n    }\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["After editing the extends field, run npm install to ensure the package is present.","Double-check package names against npm registry.","Use 'did you mean' suggestions from the diagnostic to fix typos."],"tags":["parcelrc","extends","config","module-not-found","npm"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}