Closed johnluxor closed 10 years ago
Strange behavior, it is caused by the dependencies in the require-dev
section. Move the dependencies in require
and the solver arrives to solve the version correctly ...
same problem, but not solved...
@gimox see #5083
the jquery problem came back....
The file or directory to be published does not exist: /var/www/html/app/vendor/bower/jquery/dist
solved adding "bower-asset/jquery": "@stable", jquery versin not stable hasn't "dist directory"
for a strange way...if i have some extension in require-dev, composer fail...
the bower bootstrap download the dev package it has many error in less now to solve it add in composer.json "bower-asset/bootstrap":"@stable".
It is temporarily. Do not rush to be updated.
@johnluxor please show your composer.json
{
"name": "sample/self",
"description": "sample",
"minimum-stability": "dev",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"asofter/yii2-imperavi-redactor": "*",
"yiisoft/yii2-imagine": "*",
"2amigos/yii2-grid-view-library": "*",
"2amigos/yii2-file-upload-widget": "*",
"2amigos/yii2-date-time-picker-widget": "*",
"2amigos/yii2-file-input-widget": "*",
"2amigos/yii2-bootstrap-form-helpers-library": "*",
"creocoder/yii2-nested-set-behavior": "*",
"yiisoft/yii2-jui": "*",
"2amigos/yii2-disqus-widget": "*",
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*"
},
"scripts": {
"post-create-project-cmd": [
"yii\\composer\\Installer::setPermission"
]
},
"config": {
"process-timeout": 1800
},
"extra": {
"writable": [
"runtime",
"web/media",
"web/assets"
],
"executable": [
"yii"
],
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
When I added
"bower-asset/jquery": "@stable",
"bower-asset/bootstrap": "@stable",
"bower-asset/jquery-ui": "@stable",
"bower-asset/jquery.inputmask": "@stable",
"bower-asset/punycode": "@stable"
it solved my problem
@johnluxor does not work
@johnluxor worked for me :+1:
If you want to use the stable versions for assets, you must add the flag "@ stable" for each asset package, because the package root has a "minimum-stability" option on "dev".
@johnluxor worked for me too :)
@johnluxor worked for me too, cheers
I had the same problem, like could no longer use composer as project would just collapse!
switched composer asset plugin to 1.0.0-beta1
php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta1"
and then composer update works. However the new issue was that the bower assets folder is now called bower-asset instead of bower.
So, I created an alias in the common/config/aliases.php (advanced template)
Yii::setAlias('@bower', dirname(dirname(__DIR__)) . DIRECTORY_SEPARATOR . 'vendor/bower-asset');
and (unfortunately) had to edit a line in the Yii2 codebase
vendor/yiisoft/yii2/base/Application.php @ 452 (just commented it out).
When this is officially fixed (of if there's some other way to override the @bower alias) we can just uncomment the line.
Hope this helps.
@ptheofan This change is doing in the config of composer.json file of Yii2 (see Define a custom directory for the assets installation for edit manually the config).
A solution has been found (see francoispluchino/composer-asset-plugin#29).
Now the alias of a branch is added if:
Thanks @francoispluchino !
I have also added the @stable
tag to the application composer.json: 8176a392bb31f3fe0003a5bfc9e08866a86cdd38
...
:(
[Composer\DependencyResolver\SolverProblemsException]
Problem 1
- yiisoft/yii2 dev-master requires bower-asset/jquery 2.1.*@stable | ~2.1@stable | ~1.11@stable -> no matching package found.
- yiisoft/yii2 2.0.x-dev requires bower-asset/jquery 2.1.*@stable | ~2.1@stable | ~1.11@stable -> no matchingpackage found.
- Installation request for yiisoft/yii2 * -> satisfiable by yiisoft/yii2[2.0.x-dev, dev-master].
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://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
Read <http://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
@githubjeka do you mean this?
php composer.phar global require "fxp/composer-asset-plugin:1.0.0-beta1"
what the diferent with "fxp/composer-asset-plugin:1.0.*@dev"
?
should i run it again?
@githubjeka
It work, thanks. Just change to beta
.
@MDMunir have you this error with the most recent version ("dev") installed in global mode?
@francoispluchino
ya, i got that error. I should specify version of package to be work. eg bower-asset/jquery 2.1.1
.
it is your component, right? good job, i like it :+1:
@MDMunir Can you give me your composer.json file, that I fixes this problem, please?
{
"name": "sangkil/sangkilbiz3",
"description": "Simple ERP",
"keywords": ["yii2", "ERP"],
"homepage": "http://www.sangkilsoft.com/",
"type": "project",
"license": "BSD-3-Clause",
"authors": [
{
"name": "Mujib Masyhudi",
"email": "mujib.masyhudi@gmail.com",
"homepage": "http://www.sangkilsoft.com/",
"role": "Founder and project lead"
},
{
"name": "Misbahul Munir",
"email": "misbahuldmunir@gmail.com",
"role": "Core project development"
}
],
"support": {
"issues": "https://github.com/sangkil/sangkilbiz3/issues?page=1&state=open",
"source": "https://github.com/sangkil/sangkilbiz3"
},
"minimum-stability": "dev",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-jui": "*",
"mdmsoft/yii2-admin": "*",
"mdmsoft/yii2-autonumber": "*",
"mdmsoft/yii2-logger": "*",
"mdmsoft/yii2-format-converter": "*",
"mdmsoft/yii2-client-tools": "*",
"mdmsoft/yii2-ar-behaviors": "*",
"mdmsoft/yii2-widgets": "*"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*"
},
"suggest": {
"codeception/codeception": "Codeception, 1.8.*@dev is currently works well with Yii.",
"codeception/specify": "BDD style code blocks for PHPUnit and Codeception",
"codeception/verify": "BDD Assertions for PHPUnit and Codeception",
"yiisoft/yii2-faker": "Fixtures generator for Yii2 based on Faker lib",
"yiisoft/yii2-mongodb": "Use for transaction logging"
},
"config": {
"process-timeout": 1800
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
mdmsoft/*
has no required bower
@MDMunir I just tested, and everything is OK. I think your Composer does not use the latest version dev
of my plugin (and also Composer).
Commands executed:
$ composer selfupdate
$ composer global require fxp/composer-asset-plugin:@dev
You can also update your global dependencies:
$ composer global update
And I get:
$ composer install --prefer-dist
Loading composer repositories with package information
Installing dependencies (including require-dev)
- Installing yiisoft/yii2-composer (dev-master 0128e4a)
Downloading: 100%
Extracting archive
- Installing bower-asset/jquery (2.1.1)
Downloading: 100%
Extracting archive
- Installing bower-asset/yii2-pjax (v2.0.0)
Downloading: 100%
Extracting archive
- Installing bower-asset/punycode (v1.3.1)
Downloading: 100%
Extracting archive
- Installing bower-asset/jquery.inputmask (3.x-dev 836b4e5)
Downloading: 100%
Extracting archive
- Installing cebe/markdown (0.9.x-dev 6a3c373)
Downloading: 100%
Extracting archive
- Installing ezyang/htmlpurifier (v4.6.0)
Downloading: 100%
Extracting archive
- Installing yiisoft/yii2 (dev-master af7ee57)
Downloading: 100%
Extracting archive
- Installing phpspec/php-diff (dev-master 30e103d)
Downloading: 100%
Extracting archive
- Installing mdmsoft/yii2-autonumber (dev-master d357c7a)
Downloading: 100%
Extracting archive
- Installing mdmsoft/yii2-logger (dev-master e307c74)
Downloading: 100%
Extracting archive
- Installing mdmsoft/yii2-format-converter (dev-master 9db2719)
Downloading: 100%
Extracting archive
- Installing mdmsoft/yii2-client-tools (dev-master 7abb733)
Downloading: 100%
Extracting archive
- Installing mdmsoft/yii2-ar-behaviors (dev-master dac5a4c)
Downloading: 100%
Extracting archive
- Installing mdmsoft/yii2-widgets (dev-master d2b8a18)
Downloading: 100%
Extracting archive
- Installing bower-asset/jquery-ui (1.11.1)
Downloading: 100%
Extracting archive
- Installing yiisoft/yii2-jui (dev-master b6ec81d)
Downloading: 100%
Extracting archive
- Installing mdmsoft/yii2-admin (dev-master 61dcf6c)
Downloading: 100%
Extracting archive
- Installing yiisoft/yii2-codeception (dev-master 2f7a70f)
Downloading: 100%
Extracting archive
- Installing bower-asset/bootstrap (v3.2.0)
Downloading: 100%
Extracting archive
- Installing yiisoft/yii2-bootstrap (dev-master f295f15)
Downloading: 100%
Extracting archive
- Installing yiisoft/yii2-debug (dev-master ae57c50)
Downloading: 100%
Extracting archive
- Installing bower-asset/typeahead.js (v0.10.5)
Downloading: 100%
Extracting archive
- Installing yiisoft/yii2-gii (dev-master 7858501)
Downloading: 100%
Extracting archive
mdmsoft/yii2-logger suggests installing yiisoft/yii2-mongodb (Use for mongo storage)
Writing lock file
Generating autoload files
@francoispluchino Sory, may be its my fault. I run
php composer.phar global require "fxp/composer-asset-plugin:1.0.*@dev"
more than week ago. I dont see @dev
here, so i dont have initiative to update it :grinning: .
I will update it to dev
again. thanks.
@francoispluchino Thx ;)
Today, I decided execute composer update command, but get that errors