I am running into this issue attempting to upgrade to composer version 2. In a Laravel\Homestead vagrant box on Windows 10 with Virtual box.
PHP version: 7.2
composer.json:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"type": "project",
"require": {
"php": "^7.2",
"ext-json": "*",
"arcanedev/log-viewer": "^5.1",
"asvae/laravel-api-tester": "^2.0",
"aws/aws-sdk-php": "^3.101",
"bepsvpt/secure-headers": "^5.3",
"beyondcode/laravel-websockets": "^1.8",
"doctrine/annotations": "^1.6",
"doctrine/couchdb": "^1.0@beta",
"doctrine/dbal": "^2.7",
"fideloper/proxy": "^4.0",
"firebase/php-jwt": "^5.0",
"gluedev/laravel-stackdriver": "^0.1.2",
"google/cloud": "^0.96.0",
"google/protobuf": "^3.8",
"graylog2/gelf-php": "^1.6",
"hoa/console": "^3.17",
"ircmaxell/random-lib": "^1.2",
"kitetail/zttp": "^0.6.0",
"ktamas77/firebase-php": "^2.2",
"langleyfoxall/laravel-nist-password-rules": "^4.1",
"laravel/framework": "6.18.22",
"laravel/passport": "^9.3",
"laravel/tinker": "^2.0",
"laravel-notification-channels/twilio": "^3.1",
"league/csv": "^9.1",
"league/flysystem-aws-s3-v3": "^1.0",
"league/flysystem-azure-blob-storage": "^0.1.6",
"league/flysystem-cached-adapter": "^1.0",
"league/flysystem-rackspace": "^1.0",
"league/flysystem-sftp": "^1.0",
"league/flysystem-webdav": "^1.0",
"league/flysystem-ziparchive": "^1.0",
"mockery/mockery": "^1.0",
"mollie/polyfill-libsodium": "^1.1",
"nexmo/client": "^1.8",
"nyholm/psr7": "^1.1",
"opencensus/opencensus-exporter-stackdriver": "~0.1",
"pda/pheanstalk": "^4.0",
"php-amqplib/php-amqplib": "^2.9",
"php-console/php-console": "^3.1",
"phpseclib/mcrypt_compat": "^1.0",
"phpunit/php-invoker": "^2.0",
"predis/predis": "^1.1",
"propaganistas/laravel-intl": "^3.0",
"propaganistas/laravel-phone": "^4.2",
"psr/event-dispatcher": "^1.0",
"ramsey/uuid-doctrine": "^1.5",
"rbdwllr/reallysimplejwt": "^2.0.42",
"rollbar/rollbar": "^1.8",
"ruflin/elastica": "^6.1",
"spatie/flysystem-dropbox": "^1.1",
"spatie/laravel-fractal": "^5.6",
"spatie/laravel-permission": "^3.6",
"symfony/browser-kit": "^4.3",
"symfony/config": "^4.3",
"symfony/dependency-injection": "^4.3",
"symfony/dom-crawler": "^4.3",
"symfony/expression-language": "^4.3",
"symfony/lock": "^4.3",
"symfony/translation": "4.3.8",
"symfony/yaml": "^4.3",
"titasgailius/search-relations": "^1.0",
"true/punycode": "^2.1",
"twilio/sdk": "^6.10",
"unicodeveloper/laravel-password": "1.0.*",
"voiceit-php/voiceit2": "^3.0",
"whoops/soap": "^1.0",
"wildbit/swiftmailer-postmark": "^3.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.3",
"beyondcode/laravel-er-diagram-generator": "^0.2.2",
"coderello/laravel-populated-factory": "^0.3.0",
"facade/ignition": "^1.16",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0",
"squizlabs/php_codesniffer": "^3.3"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"scripts": {
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
and I get this as an output:
Executing command (CWD): rm -rf '/home/vagrant/<myAppDirectory>/vendor/wildbit/swiftmailer-postmark'
Downloading https://packagist.org/downloads/
[201] https://packagist.org/downloads/
[RuntimeException]
Could not delete /home/vagrant/<myAppDirectory>/vendor/composer/package-versions-deprecated/src:
Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:218
Composer\Util\Filesystem->unlink() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:171
Composer\Util\Filesystem->removeDirectoryPhp() at phar:///usr/local/bin/composer/src/Composer/Util/Filesystem.php:138
Composer\Util\Filesystem->removeDirectory() at phar:///usr/local/bin/composer/src/Composer/Downloader/FileDownloader.php:378
Composer\Downloader\FileDownloader->remove() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:349
Composer\Downloader\DownloadManager->remove() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:299
Composer\Installer\LibraryInstaller->removeCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:189
Composer\Installer\LibraryInstaller->uninstall() at phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php:121
Composer\Installer\PluginInstaller->rollbackInstall() at phar:///usr/local/bin/composer/src/Composer/Installer/PluginInstaller.php:79
Composer\Installer\PluginInstaller->Composer\Installer\{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20
React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:74
React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
React\Promise\Deferred->resolve() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20
React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:78
React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
React\Promise\Deferred->resolve() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20
React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:78
React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
React\Promise\Deferred->resolve() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20
React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:78
React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
React\Promise\Deferred->resolve() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/FulfilledPromise.php:20
React\Promise\FulfilledPromise->then() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:78
React\Promise\Deferred->React\Promise\{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:166
React\Promise\Deferred->processQueue() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Deferred.php:95
React\Promise\Deferred->resolve() at phar:///usr/local/bin/composer/vendor/react/promise/src/React/Promise/Promise.php:42
React\Promise\Promise->React\Promise\{closure}() at n/a:n/a
call_user_func() at phar:///usr/local/bin/composer/src/Composer/Util/ProcessExecutor.php:284
Composer\Util\ProcessExecutor->countActiveJobs() at phar:///usr/local/bin/composer/src/Composer/Util/Loop.php:95
Composer\Util\Loop->wait() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:454
Composer\Installer\InstallationManager->waitOnPromises() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:440
Composer\Installer\InstallationManager->executeBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:367
Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:266
Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:696
Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:533
Composer\Installer->doUpdate() at phar:///usr/local/bin/composer/src/Composer/Installer.php:245
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/UpdateCommand.php:231
Composer\Command\UpdateCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Command/Command.php:245
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:835
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:185
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:310
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Application.php:117
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:122
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:63
require() at /usr/local/bin/composer:24
I am not sure how to fix it. I can get around it by running composer --no-plugins
. However, I am not sure that I actually want to do that.
Any help would be much appreciated.
-- Thanks