-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Composer error. #5061
Comments
see #5060 (comment) |
That done. Now issue is Jquery is not getting loaded. as in code used.
but dist folder not found. |
|
can you please chnage and commit so i can take composer update. |
Also while running composer update it ask me git username and password is there any way i can avoid that for deployment process? |
Hi, I followed the description, but all assets are not beeing loaded into the webapp? |
Why not? Loaded. |
class JqueryAsset extends AssetBundle
{
public $sourcePath = '@bower/jquery';
public $js = [
'dist/jquery.js',
];
} just add to your yii2-app-advanced/frontend/assets/AppAsset.php public $depends = [
'yii\web\YiiAsset',
//...
]; |
this is already added. but path is invalid as dist is missing. |
Is folder |
yes |
please show your |
|
see comment #5059 |
clean the entire folder |
And all because they all followed and removed this line here |
I have all files under vendor bower and after removing the @web/assets folder it's back "working" - can someone pls add a "how to" for this asset management change? even maybe here so really all needed steps are in a chronological order listed |
For example
In composer.json "require": {
"bower-asset/angular": "1.2.25",
"bower-asset/angular-animate": "dev-master"
}, |
The problem is because jquery 2.1 and prior versions have different folder structures. I just checked in a fix to use |
Can we somehow get verison and adjust bundle path based on it? I don't like that we're still using mirrors. |
Theoretically each release of Yii should use fixed versions of dependent packages. So this problem shouldn't appear in formal releases. In case an application uses a different version, the user can still use asset manager to configure asset bundle to customize the actual paths. |
Well, actually there is still a problem if we use jquery bower package and want to support both 2.0 and 2.1 since their directory structures are different. So perhaps we will stick to |
Then any bower package that requires jquery will trigger additional download, won't it? |
can we came back to previous commit before "bower" ? |
@samdark Yes, that's managed by bower. We have no control over it. |
@gimox Sorry if this change brought you troubles. We have to make this change because it is a major step forward that we have to make. We did expect that there could be all sorts of troubles during this transition period. We will try to solve them asap. |
what about if in jquery relase the structure of dir change? |
@gimox since stable version (October 12 :)), framework will have a stable version of jQuery, so risk of today problem is minimal |
i develop for bank and financial, for our team minimal is not aceptable. |
yii is currently in development and we explicitily stated that things will change and we will not keep BC until final release of 2.0. |
You can use composer and set dependencies's version strongly in your composer.json to minimize risk of project's breaking. It may be good practice especially for bank/financial projects. |
it's impossible to say if jquery 2.2.9 has will have the same identical structure compared to 2.2.1 we need to check manually |
It's a more right way... доверяй, но проверяй :) |
mmm composer is usefull to update dependance without panic. |
interesting instead of making it easy for new users / beginners. we kicking up a notch now with this bower and npm are officially yii2 dependencies |
When the "global connector of bower" will be moved to |
we are explicitly not requiring NPM or bower to be installed on your system but use a composer plugin to avoid this step. There is a pull request open on composer side that will allow this all to be installed automatically. It is just not merged now so you have to make one step installing the plugin yourself. |
Update: Not working, jquery still not loaded... FYI I tried all the solutions posted without success. I am new to composer and do not yet understand the issue here that well. However, what worked for me: Symlink (linux) the /src folder to 'dist'. As I understand this package changed its file location from /src to /dist so this will work for now. |
@dniznick with the latest version of yii + composer asset plugin everything should work fine now. |
yiisoft/yii2 dev-master requires bower-asset/jquery >=1.8 -> no matching package found.
The text was updated successfully, but these errors were encountered: