A pruned copy couldn't be written
error: couldn't trim pnpm-lock.yaml: Axle doesn't read lockfile version 5.4hint: Install with a version of your package manager that Axle reads, or update Axle, then run axle prune again.error: .. can't hold the pruned copyhint: Give a folder that isn't the repository, a folder around it or inside .git, such as out.Why it happens
Section titled “Why it happens”axle prune couldn’t write its copy:
- The lockfile can’t be trimmed. It’s Bun’s older binary
bun.lockb, a lockfile from a version of the package manager Axle doesn’t read, or a lockfile with a merge conflict in it. Axle trimspnpm-lock.yamlversions 6 and 9,package-lock.jsonversions 2 and 3,yarn.lockfrom Yarn 1 on, andbun.lockup to version 2. - The folder can’t hold the copy.
--outnames the repository itself, a folder around it, or a folder inside.git, where the copy would mix with the repository.
Nothing was written.
How to fix it
Section titled “How to fix it”- If the lockfile has conflict markers, resolve them and install again. If its format is older than Axle reads, install with a current version of your package manager; if it’s newer, update Axle. Bun converts
bun.lockbtobun.lockwithbun install --save-text-lockfile. - Give
--outa new folder, such asout, or one outside the repository.