parcel-bundler/parcel · error · Error
A Parcel link could not be found!
Error message
A Parcel link could not be found!
What it means
Thrown by the `parcel-link unlink` command when no `.parcel-link` config file is found in the current working directory (appRoot). `ParcelLinkConfig.load` is wrapped in a try/catch that swallows the error, so `parcelLinkConfig` stays undefined and the command refuses to run. The message tells you there is nothing to undo because no link was ever established here.
Source
Thrown at packages/dev/parcel-link/src/unlink.js:164
let appRoot = process.cwd();
let parcelLinkConfig;
try {
parcelLinkConfig = await ParcelLinkConfig.load(appRoot, {fs});
} catch (e) {
// boop!
}
if (parcelLinkConfig) {
await action(parcelLinkConfig, {
dryRun: options.dryRun,
forceInstall: options.forceInstall,
log,
});
if (!options.dryRun) await parcelLinkConfig.delete();
} else {
throw new Error('A Parcel link could not be found!');
}
log('🎉 Unlinking successful');
});
}
View on GitHub (pinned to 59484858a1)
Solutions
- Verify you are in the app root that was originally linked: `ls -la .parcel-link` — the file must exist.
- If you already unlinked (or the file is gone), there is nothing to do; the unlink is a no-op goal and you can ignore the error.
- If you are in the wrong directory, `cd` to the directory that contains `.parcel-link` and re-run `parcel-link unlink`.
- If you want to unlink a stale link whose config file was lost, manually restore node_modules with `yarn install --force` (or your package manager equivalent).
Example fix
// before (wrong cwd) $ cd packages/app/src && parcel-link unlink // after $ cd /path/to/app-root $ parcel-link unlink
Defensive patterns
Strategy: validation
Validate before calling
import fs from 'fs';
function canUnlink(appRoot) {
return fs.existsSync(`${appRoot}/.parcel-link`);
}
if (!canUnlink(process.cwd())) {
console.error('No .parcel-link in cwd — nothing to unlink.');
process.exit(0);
} Prevention
- Always run parcel-link unlink from the same directory you ran link in.
- Treat the absence of `.parcel-link` as a successful no-op rather than an error in CI.
- Keep link/unlink operations in scripts anchored to a known app root.
When it happens
Trigger: Running `parcel-link unlink` (or `unlink`) in a directory where `parcel-link link` was never run, or where the `.parcel-link` file was already deleted. Also when running from the wrong directory (not the app root that contains the link).
Common situations: Running unlink after manually deleting `.parcel-link`; running it from a subdirectory rather than the app root; CI or a fresh clone where the link was never set up; double-running unlink (the second invocation finds nothing).
Related errors
- Entry ${entry} does not exist
- Only one spread parameter can be included in a config pipeli
- Local plugins are not supported in Parcel config packages. P
- Could not determine version of ${pluginName} in ${path.relat
- Config result is not hashable because it contains non-serial
AI-assisted analysis of parcel-bundler/parcel@59484858a1 (2026-08-13).
Data as JSON: /api/errors/94b472f68ab1f4fb.
Report an issue: GitHub.