johnpbloch / wordpress-core

Other
169 stars 40 forks source link

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

Closed scibuff closed 1 year ago

scibuff commented 3 years ago

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 commented 3 years ago

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

maietta commented 2 years ago

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 commented 1 year ago

Closing as resolved. This was an issue with johnpbloch/wordpress-core-installer and was resolved in https://github.com/johnpbloch/wordpress-core-installer/pull/27