3

This is my composer .json file

{
"minimum-stability": "stable",
"require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": "*",
    "yiisoft/yii2-bootstrap": "*",
    "yiisoft/yii2-swiftmailer": "*",
    "kartik-v/yii2-nav-x": "*",
    "johnitvn/yii2-ajaxcrud": "*",
    "kartik-v/yii2-grid": "@dev",
    "kartik-v/yii2-widget-timepicker": "*",
    "kartik-v/yii2-widget-colorinput": "*",
    "kartik-v/yii2-widget-datepicker": "@dev",
    "kartik-v/yii2-widget-select2": "@dev",
    "kartik-v/yii2-date-range": "dev-master",
    "kartik-v/yii2-field-range": "dev-master",
    "kartik-v/yii2-helpers": "dev-master",
    "kartik-v/yii2-widget-datetimepicker": "*",
    "kartik-v/yii2-widget-typeahead": "*",
    "kartik-v/yii2-tabs-x": "@dev",
    "bedezign/yii2-audit": "*",
    "2amigos/yii2-chartjs-widget": "*",
    "wbraganca/yii2-dynamicform": "*",
    "kartik-v/yii2-mpdf": "*",
    "kartik-v/yii2-export": "@dev",
    "kartik-v/yii2-dialog": "@dev"
},
"require-dev": {
    "yiisoft/yii2-debug": "~2.0.0",
    "yiisoft/yii2-gii": "~2.0.0",
    "yiisoft/yii2-faker": "~2.0.0",

    "codeception/base": "^2.2.3",
    "codeception/verify": "~0.3.1"
},


   "config": {
        "process-timeout": 1800,
        "fxp-asset":{
            "installer-paths": {
                "npm-asset-library": "vendor/npm",
                "bower-asset-library": "vendor/bower"
            }
        }
    }
}

I get the source code from GitHub and add "kartik-v/yii2-dialog": "@dev" into the file and run composer update

But then it keep showing error

Problem 1 - kartik-v/yii2-dialog v1.0.1 required bower-asset/bootstrap3-dialog ~1.34 ->no matching package found. - kartik-v/yii2-dialog v1.0.0 required bower-asset/bootstrap3-dialog ~1.34 ->no matching package found. - Installation request for kartik-v/yii2-dialog * -> satisfiable by kartik-v/yii2-dialog[v1.0.0, v1.0.1].

Can anyone tell what is the problem? I try with another pc and instaill and it works. It just cant work on my own pc

ron
  • 175
  • 3
  • 14

1 Answers1

2

I searched a bit about this problem and I have found out there are several solutions.

  1. You can try to go to option #2 first if you don't want to test this option. Try to install Yii2 from scratch and attempt to install this widget first. If it works, then it means there are problems with your previous project's package dependencies.

  2. If first option didn't work, then the problem is probably with composer.

Try the following commands:

composer self-update
composer update

If not solved, then try further:

composer global require "fxp/composer-asset-plugin: ^1.3.1"
composer update
  1. If you're OK with transferring files, you can do whatever you wanted to do in a computer that has a working composer. Then, when it's done, copy entire project to that computer where the composer isn't working. This is probably the satisfiable option, though.
Gynteniuxas
  • 7,035
  • 18
  • 38
  • 54