{"record":{"id":"49065c7e1cbf1b1f","repo":"parcel-bundler/parcel","slug":"could-not-find-parcel-config-at-path-relative-op","errorCode":null,"errorMessage":"Could not find parcel config at ${path.relative(options.projectRoot, configPath)}","messagePattern":"Could not find parcel config at (.+?)","errorType":"exception","errorClass":"ThrowableDiagnostic","httpStatus":null,"severity":"error","filePath":"packages/core/core/src/requests/ParcelConfigRequest.js","lineNumber":175,"sourceCode":"        );\n\n  let usedDefault = false;\n  if (configPath == null && options.defaultConfig != null) {\n    usedDefault = true;\n    configPath = (\n      await options.packageManager.resolve(options.defaultConfig, resolveFrom)\n    ).resolved;\n  }\n\n  if (configPath == null) {\n    return null;\n  }\n\n  let contents;\n  try {\n    contents = await options.inputFS.readFile(configPath, 'utf8');\n  } catch (e) {\n    throw new ThrowableDiagnostic({\n      diagnostic: {\n        message: md`Could not find parcel config at ${path.relative(\n          options.projectRoot,\n          configPath,\n        )}`,\n        origin: '@parcel/core',\n      },\n    });\n  }\n\n  let {config, extendedFiles}: ParcelConfigChain = await parseAndProcessConfig(\n    configPath,\n    contents,\n    options,\n  );\n\n  if (options.additionalReporters.length > 0) {\n    config.reporters = [","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/parcel-bundler/parcel/blob/59484858a1a0bcbb71f74088956bb437a2db6505/packages/core/core/src/requests/ParcelConfigRequest.js#L157-L193","documentation":"Thrown by resolveParcelConfig() when options.inputFS.readFile(configPath) fails after the config path was successfully resolved. The path was found but the file could not be read — typically a race condition (file deleted between resolution and read) or a permissions issue. The diagnostic shows the relative path from projectRoot.","triggerScenarios":"configPath is non-null (resolved via explicit config option, .parcelrc discovery, or defaultConfig), but the subsequent readFile(configPath, 'utf8') throws an ENOENT or EACCES. This is a narrow window between resolve and read.","commonSituations":"File watcher or another process deletes/moves .parcelrc during a build; permissions changed mid-build; network filesystem (NFS) inconsistency; symlink to config that became broken; the resolved path points outside an allowed sandbox.","solutions":["Verify the file exists and is readable at the resolved path: ls -la <configPath>.","Check file permissions: chmod 644 <configPath> if needed.","If a file watcher is deleting and recreating the config, exclude .parcelrc from watching or stabilize it.","If using a symlink, ensure the symlink target exists.","Re-run the build — if it was a transient race, it may succeed on retry."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const fs = require('fs');\nfunction validateConfigReadable(configPath) {\n  try {\n    fs.accessSync(configPath, fs.constants.R_OK);\n  } catch {\n    throw new Error(`Parcel config at ${configPath} is not readable.`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Ensure .parcelrc has read permissions (chmod 644).","Avoid deleting or moving .parcelrc during active builds.","If using a symlink for .parcelrc, ensure the target exists."],"tags":["parcelrc","config","filesystem","race-condition","permissions"],"backgroundTag":null,"analyzedSha":"59484858a1a0bcbb71f74088956bb437a2db6505","analyzedAt":"2026-08-13T04:06:35.925Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}