Closed bluezed closed 6 years ago
Could you run that again with -vvv
? Looks like this in my case
create-project -vvv yiisoft/yii2-app-advanced advanced 2.0.12
It's very strange sind composer should not do any dependency resolution at all?!
Thanks for posting in our issue tracker. In order to properly assist you, we need additional information:
Thanks!
This is an automated comment, triggered by adding the label status:need more info
.
https://github.com/yiisoft/yii2-app-advanced/blob/2.0.12/docs/guide/start-installation.md
Try with composer global require "fxp/composer-asset-plugin:^1.3.1"
.
The actual version of fxp/composer-asset-plugin
would be interesting, but should even be 1.4.1
if there are no updates like in the first log.
composer global show
Thanks for the replies!
[admin@localhost public_html]$ composer global show
Changed current directory to /home/admin/.config/composer
fxp/composer-asset-plugin v1.4.1 NPM/Bower Dependency Manager for Composer
And composer create-project -vvv yiisoft/yii2-app-advanced advanced 2.0.12
has this result:
https://gist.github.com/bluezed/584e1349a52e12cb4742258942f47085
You have some proxy inbetween
Downloading https://bower.herokuapp.com/packages/typeahead.js using proxy tcp://proxywww.nos.office:3128
Downloading http://packagist.org/p/bower-asset/punycode%240d7fa26cd8cda246a5c045d7b1365401c06ab706a51abac17a5a161c68413e76.json using proxy tcp://proxywww.nos.office:3128
Could you try to disable that.
Yes, that's the only way to get to the internet from the office. No way around it unfortunately :(
Just wanted to add... I now tried exactly the same thing on a SLES12 machine which uses the same proxy and there it works fine.
Could there be something on that Fedora 26 machine causing this!? It's a freshly installed workstation...
Open & compare the output of some URLs on different machines, ie. https://packagist.org/p/bower-asset/punycode%240d7fa26cd8cda246a5c045d7b1365401c06ab706a51abac17a5a161c68413e76.json
If that's also the same, try to clear composer caches.
Does not look like a Yii2 issue to me, therefore I am closing it.
@schmunk42 I have same issue as @bluezed with proxy on my office , and without proxy at my home too.
This is log with -vvv option https://pastebin.com/EvQxHwiy
Please help
Does
composer clear-cache
or removing the vendor folder help?
For me composer clear-cache
did not make a difference and the vendor
folder does not even exist yet at the time when the error occurs.
@S1AnGeR You are missing the FxpAssetPlugin
, there should be such a line in the logs
Loading plugin Fxp\Composer\AssetPlugin\FxpAssetPlugin_composer
@bluezed What looks strange to me in your logs are lines like
Downloading http://packagist.org/p/bower-asset/typeahead.js%24815d31dd9c50c84c1f26743f638197c08e46a6b7bb8822c72c097ed21524fd65.json using proxy tcp://proxywww.nos.office:3128
Writing /home/admin/.cache/composer/repo/https---packagist.org/provider-bower-asset$typeahead.js.json into cache
I get an 404 error from packagist.org, when I try access it. Moreover, I even haven't such entries in the log. There should also be no information about it on packagist.org?! @francoispluchino
Before the error, there are those lines
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
Reading C:/Users/desun/AppData/Local/Composer/repo/https---packagist.org/provider-bower-asset$jquery.json from cache
I wonder why composer
tries to load the same file 10 times?!
Can you check the contents of the file and also the response in curl and with your browser, is it valid json
?
As a workaround you might try this...
FXP_ASSET__VCS_DRIVER_OPTIONS='{"github-no-api": true}' composer create-project -vvv yiisoft/yii2-app-advanced advanced-noapi 2.0.12
Just checked the file in cache and the one downloaded from packagist and both completely match and seem valid. This is the link it used this time: http://packagist.org/p/bower-asset/jquery%24542269e8b1db94fee3ee9352fc3e24f57a2dfd8cd292430defe7b4a9bd2df7ae.json It works fine from here... but I guess maybe the token it uses is only valid for a certain amount of time hence later the 404 may be displayed?
Unfortunately the workaround also didn't make a difference. Still the same error.
Thank you very much for continuing to try to help with this. Much appreciated!
You don't have FXP_ASSET__ENABLED=0
in your env or in composer.json (globally) haven't you?
That's the only way I can reproduce a similar behavior: https://gist.github.com/schmunk42/3ceb2f44d4d7e2ba365b8836f2c64aaa while seeing a loaded plugin.
With dev-master
this would be no issue, since there's a fallback on asset-packagist.org.
No, nothing like that in env or global composer.json
.
As mentioned before it's a freshly installed Fedora 26 workstation. Only change from "stock" is that I use a proxy. Nothing else has been touched.
And yes, dev-master
can be installed. Guess I'll use that for now...
I tried building a Fedora 26 + PHP image with Docker...
Dockerfile
FROM fedora:26
# Install php & git
RUN yum -y install php git
# Install composer
ENV PATH=/usr/local/bin:$PATH
RUN curl -sS https://getcomposer.org/installer | php -- \
--filename=composer \
--install-dir=/usr/local/bin && \
composer global require --optimize-autoloader \
"fxp/composer-asset-plugin:^1.4.1" && \
composer global dumpautoload --optimize && \
composer clear-cache
Build
docker build . -t test/issue14925
Run
docker run --rm -it test/issue14925 bash
Create app in container
$ composer create-project -vvv yiisoft/yii2-app-advanced advanced 2.0.12 --ignore-platform-reqs
Works. I am at my wit's end, sorry.
Thanks for trying!
It probably is something to do with the proxy as I just tried it at home with a fresh Fedora 26 VM and it works without problems.
So... I'll work around the issue as it's only for one project.
Thank you!
I was having the same exact behaviour as described. I have been able to fix it by using the steps mentioned here.
I am facing the same issue while running the composer update command. Due to this issue, I am unable to integrate any new components into my project. Error as shown below-
Problem 1
To enable extensions, verify that they are enabled in your .ini files:
php --ini
inside terminal to see which files are used by PHP in CLI mode.Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
I'm trying to install the 2.0.12 advanced application via composer and run into an error which I've not been able to figure out yet.
What steps will reproduce the problem?
Using the steps in the Guide:
composer global require "fxp/composer-asset-plugin:^1.2.0"
composer create-project yiisoft/yii2-app-advanced advanced 2.0.12
What is the expected result?
Working advanced apllication.
What do you get instead?
Additional info