zurb-foundation icon indicating copy to clipboard operation
zurb-foundation copied to clipboard

Unable to install on Laravel 6.1.0

Open orlandob11 opened this issue 4 years ago • 8 comments

Im trying to install in a fresh installation of Laravel 6.1.0 project and im getting this error:

Your requirements could not be resolved to an installable set of packages.

Problem 1 - Conclusion: don't install laravel-frontend-presets/zurb-foundation v2.1.1 - Conclusion: remove laravel/framework v6.1.0 - Installation request for laravel-frontend-presets/zurb-foundation ^2.1 -> satisfiable by laravel-frontend-presets/zurb-foundati on[v2.1.0, v2.1.1]. - Conclusion: don't install laravel/framework v6.1.0 - laravel-frontend-presets/zurb-foundation v2.1.0 requires laravel/framework ^5.5 -> satisfiable by laravel/framework[5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev]. - Can only install one of: laravel/framework[5.5.x-dev, v6.1.0]. - Can only install one of: laravel/framework[5.6.x-dev, v6.1.0]. - Can only install one of: laravel/framework[5.7.x-dev, v6.1.0]. - Can only install one of: laravel/framework[5.8.x-dev, v6.1.0].

- Installation request for laravel/framework (locked at v6.1.0, required as ^6.0) -> satisfiable by laravel/framework[v6.1.0].

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

orlandob11 avatar Oct 04 '19 18:10 orlandob11

Same her with Laravel v6.4.1.

@orlandob11 Any luck? Have you managed do solve this issue?

adamromanowski avatar Nov 04 '19 14:11 adamromanowski

Gents, I've received the same errors as listed in OP (@orlandob11)

The error messages state that composer is trying to use v2.1.1 of this package. I eventually actually checked v2.1.1; it's not the master, and its composer.json doesn't include the necessary change to line ~7:

"require": {
        "laravel/framework": "^5.5|^6.0"
    },

So, fortunately, getting this preset to work is just a matter of specifying the dev version when you run the initial command: composer require laravel-frontend-presets/zurb-foundation:dev-master

darryn-smith avatar Dec 22 '19 19:12 darryn-smith

Hi

I've had luck installing this by specifying the version of Laravel to install - As shown by the debugging messages in the OP - any version between 5.5 and 5.8 works to get this installed.

This link provided the fix.

Delete your installation as per the instructions given, and install the specific version of Laravel you want using Composer, not the Laravel installer.

composer create-project laravel/laravel your-project-name 5.8

The instructions provided work after installing the correct version of Laravel.

FlatspinZA avatar May 14 '20 10:05 FlatspinZA

Hi I lag behind this updates. Probably lot had been changed. I will really appreciate, if some can test and do the proper pull request

deeshrestha avatar May 16 '20 18:05 deeshrestha

⇒  composer require laravel-frontend-presets/zurb-foundation
Using version ^2.1 for laravel-frontend-presets/zurb-foundation
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
  - Installing laravel-frontend-presets/zurb-foundation (v2.1.2): Downloading (100%)         
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Error 

  Class 'Illuminate\Foundation\Console\PresetCommand' not found

  at vendor/laravel-frontend-presets/zurb-foundation/src/ZurbFoundationPresetServiceProvider.php:16
    12|      * @return void
    13|      */
    14|     public function boot()
    15|     {
  > 16|         PresetCommand::macro('foundation', function ($command) {
    17|             ZurbFoundationPreset::install(false);
    18|             $command->info('Foundation scaffolding installed successfully.');
    19|             $command->comment('Please run "npm install && npm run dev" to compile your fresh scaffolding.');
    20|         });

      +8 vendor frames 
  9   [internal]:0
      Illuminate\Foundation\Application::Illuminate\Foundation\{closure}(Object(LaravelFrontendPresets\ZurbFoundationPreset\ZurbFoundationPresetServiceProvider))

      +5 vendor frames 
  15  artisan:37
      Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

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

tested with Laravel 7, fresh project. No pull request but composer, sorry.

MillaSense avatar Aug 05 '20 11:08 MillaSense

Hello People! @MillaSense I run into the same problem when trying to install it using Laravel 7 new project. @Laraveldeep I have came up with solution to this - there was change regarding missing dependency and "preset" command (which in fact was renamed to "ui" in Laravel 7.0 :grin: ). I will try to prepare PR with the changes this weekend :+1:

gucu112 avatar Aug 07 '20 20:08 gucu112

Hello. I have submitted PR #14 which contains fix for Laravel 6. I will prepare further fixes for Laravel 7 in next PR :muscle:

Edit: Regarding versioning I personally think that PR #14 should go under v3.0.0 in my opinion as it starts support next major Laravel version.

I would like to also suggest to drop version v2.1.2 - there is Laravel version 7.0 specified in composer.json however, this version will not work properly with it: https://github.com/laravel-frontend-presets/zurb-foundation/compare/v2.1.1...v2.1.2

gucu112 avatar Aug 11 '20 14:08 gucu112

Will this package work with Laravel 8?

hashimaziz1 avatar Feb 12 '21 00:02 hashimaziz1