UnexpectedValueException 尝试安装 laravelcollective 时无法解析版本约束

UnexpectedValueException Could not parse version constraint when trying to instal laravelcollective(UnexpectedValueException 尝试安装 laravelcollective 时无法解析版本约束)
本文介绍了UnexpectedValueException 尝试安装 laravelcollective 时无法解析版本约束的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 laravel 的新手,我正在尝试安装 laravelcollective.我只是关注文档here,我在我的项目目录中使用它:

作曲家需要 "laravelcollective/html":"^5.4.0"

不幸的是,在我按下 ented 后,我立即收到以下错误:

<块引用>

[意外值异常]无法解析版本约束:5.4.0:无效的版本字符串:5.4.0"

我只是不知道如何解决这个问题.我在谷歌上没有找到太多东西,再加上我对 laravel 缺乏经验,这让我陷入了困境.

有人可以帮忙吗?

解决方案

你可以在composer.json中手动添加,然后使用composer update.

只需在 "laravel/framework":"5.4.*", 的行下添加 "laravelcollective/html": "5.4.*",>

像这样:

要求":{"php": ">=7.0.0",fideloper/代理":~3.3",laravel/框架":5.4.*","laravelcollective/html": "5.4.*", <-- 添加这一行laravel/修补匠":~1.0"},

I am new to laravel and I am trying to install laravelcollective. I am just following to documentation here and I am using this from my project directory:

composer require "laravelcollective/html":"^5.4.0"

Unfortunately, immediately after I press ented I get the following error :

[UnexpectedValueException] Could not parse version constraint :5.4.0: Invalid version string ":5.4.0"

I just don't know how to troubleshoot this. I didn't find much on google and this combined with my lack of experience with laravel leaves me stuck.

Can someone help?

解决方案

You can add it manually in composer.json then use composer update.

Just add "laravelcollective/html": "5.4.*", under the row with "laravel/framework":"5.4.*",

Like this :

"require": {
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
        "laravel/framework": "5.4.*",
        "laravelcollective/html": "5.4.*", <-- Add this row
        "laravel/tinker": "~1.0"
    },

这篇关于UnexpectedValueException 尝试安装 laravelcollective 时无法解析版本约束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Convert JSON integers and floats to strings(将JSON整数和浮点数转换为字符串)
in php how do I use preg replace to turn a url into a tinyurl(在php中,如何使用preg替换将URL转换为TinyURL)
all day appointment for ics calendar file wont work(ICS日历文件的全天约会不起作用)
trim function is giving unexpected values php(Trim函数提供了意外的值php)
Basic PDO connection to MySQL(到MySQL的基本PDO连接)
PHP number_format returns 1.00(Php number_Format返回1.00)