A machine-readable guide to this site for AI agents and language models is available at/llms.txt(https://dev.acquia.com/llms.txt on the production site).
Code deploy failing due to "error: unable to create symlink xxx (File name too long)" | Cloud Platform | Acquia Product Documentation
Cloud Platform
Code deploy failing due to "error: unable to create symlink xxx (File name too long)"
Code deploy failing due to "error: unable to create symlink xxx (File name too long)"
Date Published: March 14, 2024
Issue
When trying to deploy code, the task fails and the logs show the error:
"error: unable to create symlink xxx (File name too long)"
Resolution
This error indicates an issue with your committed files. There are two methods to resolve this issue:
Recreating missing symlinks
If you see the symlinks are in your vendor/bin folder the easiest way to resolve this issue is removing the vendor and regenerating it. Make sure to update your your Composer to the latest version.
You should be able to see `typechange` when you are running `git status`:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
typechange: vendor/bin/var-dump-server
Setting symlinks to false
If you are using a Windows-based Git client, you should be able to fix using the following:
git config core.symlinks false
You can also, set symlinks to false in the core section of .git/config file.
[core]
...........
symlinks = false
Cause
The following source provides details on the cause of this issue:
>>> As soon as you changed the content of a fake-symlink-file without also changing its mode from symlink to regular file and committed the result, you made a blob that can't be extracted on an OS with real symlinks, because you have an object that is supposed to be a symlink but its content is too long to be a pathname. The web interface is not doing you any favors by hiding this problem. You're probably going to have to back up to that commit, fix it, and re-commit everything after it. git rebase -i will help, but it still might not be easy, especially if you've made more changes to the files while they were in this bogus symlink-but-not-really-a-symlink state.