Laravel 网络套接字安装
Laravel web-Socket installation
我想安装 Laravel Web-Socket 包,但是当我 运行 这个命令时我遇到了一些错误
作曲家需要 beyondcode/laravel-websockets
beyondcode/laravel-websockets 使用版本 ^1.12
运行 作曲家更新 beyondcode/laravel-websockets --with-all-dependencies
使用包信息加载作曲家存储库
更新依赖项
无法将您的要求解析为一组可安装的软件包。
问题 1
- 根目录 composer.json 需要 laravel/framework ^8.65,发现 laravel/framework[v8.65.0, ..., 8.x-dev] 但这些未加载,可能是因为它与另一个要求。
安装失败,正在将 ./composer.json 和 ./composer.lock 还原为其原始内容。
这是我的 composer.json :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fruitcake/larAavel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.65",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10"
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"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"
],
"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
},
"minimum-stability": "dev",
"prefer-stable": true
}
简单的做一件事
删除 composer.lock 文件,然后安装所需的包
我想安装 Laravel Web-Socket 包,但是当我 运行 这个命令时我遇到了一些错误 作曲家需要 beyondcode/laravel-websockets
beyondcode/laravel-websockets 使用版本 ^1.12 运行 作曲家更新 beyondcode/laravel-websockets --with-all-dependencies 使用包信息加载作曲家存储库 更新依赖项 无法将您的要求解析为一组可安装的软件包。
问题 1 - 根目录 composer.json 需要 laravel/framework ^8.65,发现 laravel/framework[v8.65.0, ..., 8.x-dev] 但这些未加载,可能是因为它与另一个要求。
安装失败,正在将 ./composer.json 和 ./composer.lock 还原为其原始内容。
这是我的 composer.json :
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"fruitcake/larAavel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.65",
"laravel/sanctum": "^2.11",
"laravel/tinker": "^2.5"
},
"require-dev": {
"facade/ignition": "^2.5",
"fakerphp/faker": "^1.9.1",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^5.10",
"phpunit/phpunit": "^9.5.10"
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"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"
],
"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
},
"minimum-stability": "dev",
"prefer-stable": true
}
简单的做一件事
删除 composer.lock 文件,然后安装所需的包