当我为 laravel 版本 7.3.0 安装 laravel/ui 时出现错误
Posted
技术标签:
【中文标题】当我为 laravel 版本 7.3.0 安装 laravel/ui 时出现错误【英文标题】:i get error when i install laravel/ui for laravel version 7.3.0 【发布时间】:2021-01-23 03:30:19 【问题描述】:PS C:\wamp\www\pizzahouse> 作曲家需要 laravel/ui:^2.4 ./composer.json 已更新 使用包信息加载作曲家存储库 更新依赖(包括require-dev)
安装失败,正在将 ./composer.json 还原为其原始内容。
[作曲家\下载器\TransportException] 'http://repo.packagist.org/p/fideloper/proxy%243c476aa5bc1f7be4de12519b02c7d32e5271ecf43f8ad9119472305e52cc7d85.json ' 无法访问 URL:HTTP/1.1 400 Bad URI 需要 [--dev] [--prefer-source] [--prefer-dist] [--fixed] [--no-progress] [--no-suggest] [--no-update] [--no -scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [- -prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] []..
我的 composer.json 是
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require":
"php": "^7.2.5",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0"
,
"require-dev":
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
,
"config":
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
,
"extra":
"laravel":
"dont-discover": []
,
"autoload":
"psr-4":
"App\\": "app/"
,
"classmap": [
"database/seeds",
"database/factories"
]
,
"autoload-dev":
"psr-4":
"Tests\\": "tests/"
,
"minimum-stability": "dev",
"prefer-stable": true,
"scripts":
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
【问题讨论】:
【参考方案1】:不久前,我在 Laravel 7 项目中遇到了同样的问题,并运行了 composer require laravel/ui:^2.4
,它有效。我希望这对你也有帮助。
随着 Laravel 8 和 Jetstream 软件包的发布,情况发生了一些变化。见 Github 页面:https://github.com/laravel/ui
【讨论】:
以上是关于当我为 laravel 版本 7.3.0 安装 laravel/ui 时出现错误的主要内容,如果未能解决你的问题,请参考以下文章