headroomlabs-ai/headroom · error · Error
${pkg.name} has non-portable ${field}.${name} spec: ${spec}
Error message
${pkg.name} has non-portable ${field}.${name} spec: ${spec} What it means
Error "${pkg.name} has non-portable ${field}.${name} spec: ${spec}" thrown in headroomlabs-ai/headroom.
Source
Thrown at scripts/verify_npm_release_assets.mjs:62
const result = spawnSync("tar", ["-xzf", tarballPath, "-C", workdir], {
encoding: "utf8",
});
if (result.status !== 0) {
throw new Error(
`tar failed for ${tarballPath}: ${result.stderr || result.stdout || "unknown error"}`,
);
}
return JSON.parse(readFileSync(path.join(workdir, packageJsonPath), "utf8"));
} finally {
rmSync(workdir, { recursive: true, force: true });
}
}
function assertNoFileDependencies(pkg) {
for (const field of ["dependencies", "peerDependencies", "optionalDependencies"]) {
for (const [name, spec] of Object.entries(pkg[field] || {})) {
if (typeof spec === "string" && (spec.startsWith("file:") || spec.includes("release-assets"))) {
throw new Error(`${pkg.name} has non-portable ${field}.${name} spec: ${spec}`);
}
}
}
}
function runNpm(args, cwd) {
if (process.platform === "win32") {
return spawnSync("cmd.exe", ["/d", "/s", "/c", "npm.cmd", ...args], {
cwd,
encoding: "utf8",
});
}
return spawnSync("npm", args, {
cwd,
encoding: "utf8",
});
}View on GitHub (pinned to 322425c43b)
Solutions
- Replace the non-portable dependency spec (e.g. file:, link:, workspace:) with a published version range in ${field}.${name}
- Pin the dependency to an exact released version for release builds
When it happens
Trigger: Raised by the npm release asset verifier when a package.json dependency spec is not portable (file/link/workspace protocol), which would break published installs.
Common situations: See trigger scenarios.
AI-assisted analysis of headroomlabs-ai/headroom@322425c43b (2026-08-15).
Data as JSON: /api/errors/1cb266cc29cac887.
Report an issue: GitHub.