Couldn't write a file
error: couldn't write package.json: Access is denied. (os error 5)hint: Check that the file isn't open elsewhere and that you can write to its folder. Nothing was changed.error: couldn't write packages/web/src/button.tsx: a link takes it outside the repository or into .githint: Remove the link, or write somewhere else. Nothing was changed.Why it happens
Section titled “Why it happens”A command that changes your files, such as axle init or axle release, couldn’t write one of them. The folder may be read-only, another program may have the file locked, or a file stands where a folder is needed. Axle also refuses to write through a symbolic link or junction that leads outside the repository or into .git, so a generator or a value given to it can’t place files there.
Axle writes all of a command’s files or none: it prepares every change first, and when one file can’t be written, it puts back the files it had already changed. So nothing was changed. axle prune doesn’t change your files: it writes a new copy, and removes that copy when one of its files can’t be written.
axle login and axle logout keep tokens in your user’s configuration folder. When that file can’t be written, or Axle can’t tell where the folder is, the hint names AXLE_CONFIG_DIR, which chooses another folder.
How to fix it
Section titled “How to fix it”Close any program that has the file open, check that you can write to its folder, then run the command again. For a link, remove it or write somewhere else.