Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"composer require silverstripe/userforms" - cannot install on windows 10 #24

Open
DmitryKuh opened this issue Aug 28, 2018 · 2 comments

Comments

@DmitryKuh
Copy link

I'm trying to add the user forms (composer require silverstripe/userforms) on Windows 10 and got the following error:

Using version ^5.2 for silverstripe/userforms
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals

Installing silverstripe/segment-field (2.2.1): Loading from cache
Exposing web directories for silverstripe-vendormodule silverstripe/segment-field with method auto:
client/dist
[Symfony\Component\Filesystem\Exception\IOException]
C:\ss\public\resources\vendor\silverstripe\segment-field\client\dist is not a junction and thus cannot be removed as one

It is sound like somewhere trying to delete a symbolic link to a directory using rmdir command.

Is there any solutions/fixes to avoid this issue?

Tried to use "composer vendor-expose copy"...
No luck:
[ErrorException]
copy(C:\ss\vendor\silverstripe\segment-field\client\dist): failed to open stream: No such file or directory

@AljosaB
Copy link

AljosaB commented Dec 19, 2018

I have bumped into this kind of problem yesterday and I took the whole day to find a solution that worked for me. While composer worked for months I don't really know what I did but it stopped working yesterday. And it stopped working on all of my projects, specifically when "exposing directories". After some research I found these (without a single solution):

#15
silverstripe/silverstripe-userforms#803
#24
https://forum.silverstripe.org/t/composer-create-project-install-fails-on-win10-php7/963
https://slackarchive.silverstripe.org/slack-archive/channel/ss4/?message=151661&start=35340#msg_151661

Everything started working again when I changed the PHP version that composer is using from 7.2 -> 7.1. And btw, composer simply uses the PHP version that is set in environment path (it doesn't have a separate setting).

@maxime-rainville
Copy link
Contributor

Have you tried manually removing your resources folder and explicitly calling composer vendor-expose?

Is switching between PHP 7.1 and 7.2 systematically causing a failure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants