最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Trying to update or install composer packages gives me "Could not delete" error - Stack Overflow

programmeradmin3浏览0评论

I am trying to update/install my composer packages in my project and I get an error

"Could not delete C:\Users.../vendor/composer/bafbb53e\CarbonPHP-carbon-1e9d506\src\Carbon\Lang\[email protected]:This can be due to an antivirus or the Windows Search Indexer locking the file while they are analyzed"

I tried clearing the composer.lock file, clear the cache, delete the vendor folder and also turn off my antivirus but I get the same error, each time a different file could not be deleted.

This is my composer.json:

{
    "name": ,
    "type": "project",
    "description": ,
    "keywords": ,
    "license": "MIT",
    "require": {
        "php": "^8.0",
        "ashallendesign/short-url": "^7.10",
        "beyondcode/laravel-websockets": "1.13.2",
        "doctrine/dbal": "^3.7",
        "fruitcake/laravel-cors": "^2.0.5",
        "guzzlehttp/guzzle": "^7.2",
        "laravel/framework": "^9.0",
        "laravel/sanctum": "^3.2",
        "laravel/tinker": "^2.7",
        "laravel/ui": "^4.2",
        "maatwebsite/excel": "3.1.48",
        "microsoft/azure-storage-blob": "^1.5",
        "psr/http-message": "^1.1",
        "srmklive/paypal": "^3.0",
        "stripe/stripe-php": "^16.1",
        "twilio/sdk": "^8.3"
    },
    "require-dev": {
        "fakerphp/faker": "^1.9.1",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.4",
        "nunomaduro/collision": "^6.1",
        "phpunit/phpunit": "^9.5.10",
        "spatie/laravel-ignition": "^1.0"
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        },
        "files": [
            "app/Helpers/helper.php",
            "app/Helpers/adminHelper.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-update-cmd": [
            "@php artisan vendor:publish --tag=laravel-assets --ansi --force"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "php-http/discovery": true,
            "tbachert/spi": true
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

Initially I got some backend error mentioning about twilio client, so I tried installing the composer packages once again and that's how I am facing this error right now.

发布评论

评论列表(0)

  1. 暂无评论