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

Can't install with Composer (1.10.20 or 2.0.11) #29

Closed
scibuff opened this issue Feb 27, 2021 · 3 comments
Closed

Can't install with Composer (1.10.20 or 2.0.11) #29

scibuff opened this issue Feb 27, 2021 · 3 comments

Comments

@scibuff
Copy link

scibuff commented Feb 27, 2021

PHP: 7.4.11
Composer: 2.0.11 (tried already 1.10.20 originally)

I'm trying to install wordpress via composer with the simplest setup possible

{
  "repositories": [
    {
      "type": "composer",
      "url": "https://wpackagist.org"
    }
  ],
  "require": {
    "johnpbloch/wordpress": "^5.6"
  }
}

But I'm getting the follow error

Loading composer repositories with package information
Updating dependencies
Lock file operations: 3 installs, 0 updates, 0 removals
  - Locking johnpbloch/wordpress (5.6.2)
  - Locking johnpbloch/wordpress-core (5.6.2)
  - Locking johnpbloch/wordpress-core-installer (2.0.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 3 installs, 0 updates, 0 removals
  - Installing johnpbloch/wordpress-core-installer (2.0.0): Extracting archive
Plugin initialization failed (include(/home/vagrant/code/my-website/vendor/johnpbloch/wordpress-core-installer/src/johnpbloch/Composer/WordPressCorePlugin.php): failed to open stream: No such file or directory), uninstalling plugin
  - Removing johnpbloch/wordpress-core-installer (2.0.0)
    Install of johnpbloch/wordpress-core-installer failed


  [RuntimeException]
  Could not delete /home/vagrant/code/my-website/vendor/johnpbloch/wordpress-core-installer/src:

I can navigate to the folder and I see that file there

vagrant@homestead:~/code/my-website/vendor/johnpbloch/wordpress-core-installer/src/johnpbloch/Composer$ pwd & ll
[1] 12443
/home/vagrant/code/my-website/vendor/johnpbloch/wordpress-core-installer/src/johnpbloch/Composer
total 8
drwxrwxrwx 1 vagrant vagrant    0 Apr 16  2020 ./
drwxrwxrwx 1 vagrant vagrant    0 Apr 16  2020 ../
-rwxrwxrwx 1 vagrant vagrant 3614 Apr 16  2020 WordPressCoreInstaller.php*
-rwxrwxrwx 1 vagrant vagrant 1560 Apr 16  2020 WordPressCorePlugin.php*
[1]+  Done                    pwd
vagrant@homestead:~/code/my-website/vendor/johnpbloch/wordpress-core-installer/src/johnpbloch/Composer$

p.s I have no problem installing other packages via composer (e.g. Laravel)

Any ideas?

@FuviTeam
Copy link

got the exact same problem. Did you find a soluce ?

@maietta
Copy link

maietta commented Jul 27, 2022

I had no problem installing via Composer 2.2.9.

image

My environment: I am using WSL2 on Windows 11 Pro and Docker for Desktop to run my projects in containers. I use Git for Windows which provides Git Bash terminal which I set as my default in VSCode. Composer itself is installed using the MSI installer which offered me the experimental install option to automate Chocolately setup, if I remember right.

@johnpbloch
Copy link
Owner

Closing as resolved. This was an issue with johnpbloch/wordpress-core-installer and was resolved in johnpbloch/wordpress-core-installer#27

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

No branches or pull requests

4 participants