UnexpectedValueException Unable to parse version constraint while trying to set laravelcollective

I am new to laravel and trying to install laravelcollective. I just follow the documentation here and I use this from my project directory:

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

Unfortunately, right after pressing ente I get the following error:

[UnexpectedValueException] Failed to parse version limit: 5.4.0: invalid version string ": 5.4.0"

I just don’t know how to solve this problem. I have not found much on Google, and this, combined with my lack of experience with Laravel, leaves me at a standstill.

Can anyone help?

+6
source share
5 answers

composer.json, composer update.

"laravelcollective/html": "5.4.*", "laravel/framework":"5.4.*",

:

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

composer update - , .

, , , ^ Composer. , :

composer require 'laravelcollective/html:^5.4.0'

5.4.*, , , , Composer . :

composer require "laravelcollective/html":"5.4.*"
+2

Laravel 5.7 Laravel.

- :

composer require 'laravelcollective/html'

. :)

+2
composer require "laravelcollective/html ^5.4.0"

!

+1
source

I found the answer at this link if you are using Windows PowerShell https://github.com/LaravelCollective/html/issues/457

0
source

Source: https://habr.com/ru/post/1689202/


All Articles