parcel-bundler/parcel · error · ThrowableDiagnostic
Could not find parcel config at ${path.relative(options.proj
Error message
Could not find parcel config at ${path.relative(options.projectRoot, configPath)} What it means
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.
Source
Thrown at packages/core/core/src/requests/ParcelConfigRequest.js:175
);
let usedDefault = false;
if (configPath == null && options.defaultConfig != null) {
usedDefault = true;
configPath = (
await options.packageManager.resolve(options.defaultConfig, resolveFrom)
).resolved;
}
if (configPath == null) {
return null;
}
let contents;
try {
contents = await options.inputFS.readFile(configPath, 'utf8');
} catch (e) {
throw new ThrowableDiagnostic({
diagnostic: {
message: md`Could not find parcel config at ${path.relative(
options.projectRoot,
configPath,
)}`,
origin: '@parcel/core',
},
});
}
let {config, extendedFiles}: ParcelConfigChain = await parseAndProcessConfig(
configPath,
contents,
options,
);
if (options.additionalReporters.length > 0) {
config.reporters = [View on GitHub (pinned to 59484858a1)
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.
Defensive patterns
Strategy: validation
Validate before calling
const fs = require('fs');
function validateConfigReadable(configPath) {
try {
fs.accessSync(configPath, fs.constants.R_OK);
} catch {
throw new Error(`Parcel config at ${configPath} is not readable.`);
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- Only one spread parameter can be included in a config pipeli
- Local plugins are not supported in Parcel config packages. P
- ${path.relative(process.cwd(), source)} is not a file.
- Could not find a .parcelrc
- Failed to parse .parcelrc
AI-assisted analysis of parcel-bundler/parcel@59484858a1 (2026-08-13).
Data as JSON: /api/errors/49065c7e1cbf1b1f.
Report an issue: GitHub.