我无法barryvdh/laravel-dompdf使用composer require barryvdh/laravel-dompdf.我得到的错误是:[无效参数异常] 找不到 barryvdh/laravel-dompdf 的匹配版本。检查包拼写、您的版本限制,以及该包的稳定性是否与您的最低稳定性 (dev) 相匹配。所以为了修复错误,我包含barryvdh/laravel-dompdf: master@dev在 composer.json 中并做了一个composer update. 这次它给了我错误:在任何版本中都找不到请求的包 barryvdh/laravel-dompdf。包名可能有拼写错误下面是我的 composer.json:{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "type": "project", "require": { "php": "^7.1.3", "fideloper/proxy": "^4.0", "guzzlehttp/guzzle": "^6.3", "laravel/framework": "5.7.*", "laravel/tinker": "^1.0", "barryvdh/laravel-dompdf": "master@dev" }, "repositories": [ { "type": "composer", "url": "https:\/\/www.phpclasses.org\/" }, { "packagist": false } ], "require-dev": { "beyondcode/laravel-dump-server": "^1.0", "filp/whoops": "^2.0", "fzaninotto/faker": "^1.4", "mockery/mockery": "^1.0", "nunomaduro/collision": "^2.0", "phpunit/phpunit": "^7.0" }, "autoload": { "classmap": [ "database/seeds", "app/includes", "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" ],你认为我在这里缺少什么?
3 回答
肥皂起泡泡
TA贡献1829条经验 获得超6个赞
删除composer.json文件中的这一行
"require": {
"barryvdh/laravel-dompdf": "master@dev"
},
之后,在命令提示符中运行此命令
composer require barryvdh/laravel-dompdf
这也将下载包和 dompdf + fontlib 库。这将为您的项目生成最新版本
请检查这个:barryvdh/laravel-dompdf
Helenr
TA贡献1780条经验 获得超3个赞
用
"barryvdh/laravel-dompdf": "^0.8.4",
代替
"barryvdh/laravel-dompdf": "master@dev"
- 3 回答
- 0 关注
- 129 浏览
添加回答
举报
0/150
提交
取消