Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yii2 advanced template install with composer error #10837

Closed
thientc opened this issue Feb 14, 2016 · 15 comments
Closed

yii2 advanced template install with composer error #10837

thientc opened this issue Feb 14, 2016 · 15 comments
Labels

Comments

@thientc
Copy link

thientc commented Feb 14, 2016

Follow the document, I've tried to install yii2-advanced template with these commands:

composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application

and get errors:

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

  Problem 1
    - yiisoft/yii2 2.0.x-dev requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
    - yiisoft/yii2 dev-master requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
    - yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
    - Installation request for yiisoft/yii2 >=2.0.6 -> satisfiable by yiisoft/yii2[2.0.6, 2.0.7, dev-master, 2.0.x-dev].

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.

My composer is the latest version.

Please help to solve the problem, thank you.

@SDKiller
Copy link
Contributor

The problem may be caused by this line in yii2-advanced composer.json:

"minimum-stability": "dev",

I've faced similar problem caused by jquery.inputmask exactly.
I noticed that some their versions did not follow semver and thus resulted error when building dependencies.

You may work it around by adding --stability=stable option:

composer create-project --prefer-dist --stability=stable yiisoft/yii2-app-advanced yii-application

Output:

  - Installing yiisoft/yii2-composer (2.0.4)
    Downloading: 100%

  - Installing ezyang/htmlpurifier (v4.6.0)
    Downloading: 100%

  - Installing bower-asset/jquery (2.2.0)
    Downloading: 100%

  - Installing bower-asset/yii2-pjax (v2.0.5)
    Downloading: 100%

  - Installing bower-asset/punycode (v1.3.2)
    Downloading: 100%

  - Installing bower-asset/jquery.inputmask (3.2.7)
    Downloading: 100%

  - Installing cebe/markdown (1.1.0)
    Downloading: 100%

  - Installing yiisoft/yii2 (2.0.7)
    Downloading: 100%

  - Installing swiftmailer/swiftmailer (v5.4.1)
    Downloading: 100%

  - Installing yiisoft/yii2-swiftmailer (2.0.4)
    Downloading: 100%

  - Installing yiisoft/yii2-codeception (2.0.4)
    Downloading: 100%

  - Installing bower-asset/bootstrap (v3.3.5)
    Downloading: 100%

  - Installing yiisoft/yii2-bootstrap (2.0.5)
    Downloading: 100%

  - Installing yiisoft/yii2-debug (2.0.5)
    Downloading: 100%

  - Installing bower-asset/typeahead.js (v0.10.5)
    Downloading: 100%

  - Installing phpspec/php-diff (v1.0.2)
    Downloading: 100%

  - Installing yiisoft/yii2-gii (2.0.4)
    Downloading: 100%

  - Installing fzaninotto/faker (v1.5.0)
    Downloading: 100%

  - Installing yiisoft/yii2-faker (2.0.3)
    Downloading: 100%

@thientc
Copy link
Author

thientc commented Feb 15, 2016

Thank you, but it doesn't work for me, early this morning, Yii team release new stable version 2.0.7, and new guide on it: http://www.yiiframework.com/news/94/yii-2-0-7-is-released/ and here is the new guide: http://www.yiiframework.com/download/

To install the advanced application template, run the command below:
php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.7

I've tried the new one and it completed successfully.

@pine3ree
Copy link
Contributor

@SilverFire

I had the same issue, solved running this command:
composer global require "fxp/composer-asset-plugin:^1.0"
before updating composer.json and running
composer update -o

@DiegoGallegos4
Copy link

I tried the same @thientc84 but it didn't worked for me. Same error as above. What can be the potentical cause?

@SilverFire
Copy link
Member

Check out the solution suggested by @cebe in this comment

@qwabra
Copy link

qwabra commented Jul 26, 2016

This helped me: sudo chown -R $USER $HOME/.composer

composer-cache file permissions #19 -> pgporada commented on 1 Oct 2015

What are the permissions on your /home/webadmin/.composer folder? I just installed composer to set up a dev environment for my team with the following line

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

and it set the permissions of the .composer/ folder in my home dir to

drwxr-xr-x    3 root        staff      102 Oct  1 10:50 .composer

Running this line will fix it.

sudo chown -R $USER $HOME/.composer

@vlykhoshva
Copy link

Updating yii to latest version helped me:
composer update yiisoft/yii2 yiisoft/yii2-composer bower-asset/jquery.inputmask

@nadirvishun
Copy link

@lyhoshva ,thanks,it works as you say。

@vlykhoshva
Copy link

@nadirvishun , you are welcome.

@rich-choy
Copy link

Here's an alternative solution.

https://packagist.org/packages/yidas/yii2-composer-bower-skip

@SilverFire
Copy link
Member

@cebe
Copy link
Member

cebe commented Dec 1, 2016

Or https://github.com/cebe/assetfree-yii2

this one has all the release versions of yii2, so it is a transparent replacement.

@abdulmanan7
Copy link

neither of the above solution given by nice people helped me 👎

@cebe
Copy link
Member

cebe commented Aug 24, 2017

probably because the problem occured long time ago. open a new issue, or ask in other places if its not a framework bug:

@cebe cebe added the question label Aug 24, 2017
@yii-bot
Copy link

yii-bot commented Aug 24, 2017

Thank you for your question.
In order for this issue tracker to be effective, it should only contain bug reports and feature requests.

We advise you to use our community driven resources:

If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now.

This is an automated comment, triggered by adding the label question.

@yiisoft yiisoft locked and limited conversation to collaborators Aug 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests