2

Please see when When I run composer install please assist,

I am new to laravel and I cannot download dependency for laravelcollective/html ... I am using laravel 5.5.13

I want to require laravelcollective/html

however I face the following problems.

  1. when I run : composer require "laravelcollective/html:5.2.*",

I get the below mentioned(similarly when I run composer update ) :

C:\Users\MALULEKE\Desktop\lara_proj\shops>composer require "laravelcollective/html:5.2.*"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package laravelcollective/html could not be found in any version, there may be a typo in the package name.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json to its original content.

C:\Users\MALULEKE\Desktop\lara_proj\shops>composer require "laravelcollective/html:5.2.*"

below is my composer.json relative to my project's work (not from composer/roaming, I am not even sure which is it I must use, please help )

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=7.0.0",
        "fideloper/proxy": "~3.3",
        "laravel/framework": "5.5.*@dev",
        "laravel/tinker": "~1.0",
        "laravelcollective/html":"~5.3.@dev"

    },
    "require-dev": {
        "filp/whoops": "~2.0",
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~6.0"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "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"
        ],
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true

    }
}
Neo Sono
  • 186
  • 1
  • 4
  • 18
  • So which version you need `5.2.*` or `~5.3.@dev`? You can't have both at the same time. It is a fundamental limitation of composer. – Alex Blex Sep 28 '17 at 11:43
  • 5.3 ... I would love any v5 possibly – Neo Sono Sep 28 '17 at 12:21
  • Well, if you need 5.3, an attempt to install `"laravelcollective/html:5.2.*"` makes no sense to me. Anyway you already have v5.3 in `composer.json`, so just `composer install` it. – Alex Blex Sep 28 '17 at 12:25
  • I just added an image depicting what I get when I run composer install ... (**on the first line of the post **)... **It says package manifest generated successfully**, however I cannot see installed laravelcollective in vendor folder ... – Neo Sono Sep 28 '17 at 12:51
  • If you are using Laravel 5.5, you should also be using version 5.5 for this package.... – Devon Bessemer Sep 28 '17 at 12:55
  • I just changed from 5.3.@dev to 5.5.@dev : No change still I get what is on the attached image and no dependency is added to vendor folder. – Neo Sono Sep 28 '17 at 13:03
  • Either delete the composer.lock and `composer install` again, or run `composer update` as the message suggests. – Alex Blex Sep 28 '17 at 13:13
  • now I get an error mentioned above with problem 1 and problem 2 – Neo Sono Sep 28 '17 at 13:21
  • I have deleted composer.lock , after when I run composer install or update I get an error, see attached image, on the second link above – Neo Sono Sep 28 '17 at 13:25
  • and my composer.lock is not coming back after deleting it... – Neo Sono Sep 28 '17 at 13:30

2 Answers2

1

Try running composer require laravelcollective/html which will install the latest version of LaravelCollective packages for you.

0

I have decided to use AngularJS as my front end.

Note that this solution may not be suitable for everyone, and with this solution, problems may arrive in future, due to the need for other composer requirements, such as authentication dependencies that my be needed.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Neo Sono
  • 186
  • 1
  • 4
  • 18