1

I have removed the vendor folder and composer.lock file. When I run sudo -u www-data composer install -vv I get this error:

- Installing composer/package-versions-deprecated (1.11.99.1): Reading /home/vagrant/.composer/cache/files/composer/package-versions-deprecated/152d7deed07370b5fdb649027a98c4feafa4d280.zip from cache
Loading from cache
 Extracting archiveExecuting command (CWD): unzip -qq  '/vagrant/vendor/composer/package-versions-deprecated/6e763dced6ae19f651e467316dde4d01' -d '/vagrant/vendor/composer/29297821'
Plugin installation failed (include(/vagrant/vendor/composer/package-versions-deprecated/src/PackageVersions/Installer.php): failed to open stream: No such file or directory), rolling back
  - Removing composer/package-versions-deprecated (1.11.99.1)


  [RuntimeException]
  Could not delete /vagrant/vendor/composer/package-versions-deprecated/src/PackageVersions:

EDIT: I ended up removing everything from composer.json and then adding it back line by line. It took some time but did the trick. I didn't find out what caused the problem.

allanth
  • 423
  • 9
  • 23

1 Answers1

0

Use NFS! it will solve the composer "Could not delete" issue!

  1. Install Vagrant Plugin
vagrant plugin install vagrant-winnfsd
  1. Set NFS in your Homestead.yaml
folders:
    - map: D:\Homestead
      to: /home/vagrant/code
      type: "nfs"

For detail step-by-step tutorial you can read this... https://medium.com/@dogcomp/ec996f9a2cb6

Kidd Tang
  • 1,821
  • 1
  • 14
  • 17