Composer "Failed to create junction"

composer update shows:
Generating autoload files
Generating class alias map file

In Filesystem.php line 800:

Failed to create junction to “H:/wamp64/www/elft3bs12/vendor/clickstorm/go-maps-ext/Resources/Public” at “H:/wamp64
/www/elft3bs12/public/_assets/9297eed306bf0b9f839d8f8a5aee46f1”.

After removing clickstorm/go-maps-ext composer is struggling with another extension, so it is not clickstorm/go-maps-ext, I suppose …

Any idea, what could be going wrong?

Welcome, Norbert!

I don’t know the answer to your question, but since it is Composer-related, you may want to ask your question in Composer’s support channels too.

Let me know if you solve the issue!

Best wishes

Mathias

I have eliminated the problem by installing the site completely new to a new directory, only using my composer.json, the config files, the database and the fileadmin resources.

Thank you for the additional composer support locations - however, “Failed to create junction” or even “junction” is not mentioned there.

Hi Norbert!

Glad to hear you found a solution in the end.

I didn’t expect you to find an existing answer in Composer’s support channels, but asking the question there would have brought you closer to the people who might know the answer. :slightly_smiling_face:

Best wishes

Mathias

Solution:

Short read - Delete the content of public/_assets, run composer dump-autoload

Long read

The error “Failed to create junction …” is caused by uploading/downloading or zipping/unzipping the typo3 installation in the installation and update life cycle: the composer generates the autoload items in the directory public/_assets not as copies of, but as junctions (Windows: reparse points created by mklink /j) to the template assets in the vendor subdirectories. Uploading or zipping the installation replace these reparse points with copies. After having downloaded or unzipped the installation for update these copies prevent composer update and composer dump-autoload to update the junctions/reparse points. You have to delete the copies and completely let the composer regenerate the autoload asset links.

1 Like

Hi @norberthasler!

Fantastic! It’s great to hear this worked out for you! :smiley: :tada:

To explain this to future readers: When you’re working with Composer, just copying a zip file doesn’t work that well. You have to take more of a deployment approach, where you clone the Git repository and run composer install to allow Composer to recreate the install based on the composer.lock file and it’s own ways and means. Thus the Git repository should never contain any of the folders generated by Composer’s install operation, such as the vendor/ directory.

Best wishes

Mathias