Cannot update yii2 via composer bower-asset/jquery could not be found

后端 未结 7 2116
野趣味
野趣味 2020-12-12 16:54

I was updating my yii2 via composer then reverted back to the old beta version.

Here is the error on my composer:

Loading composer repositories with          


        
7条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-12 17:35

    If you don't want to use fxp/composer-asset-plugin then all you have to do is to follow these simple instructions from Yii2 documentation.

    Using asset-packagist repository

    This way will satisfy requirements of the majority of projects, that need NPM or Bower packages.

    Note: Since 2.0.13 both Basic and Advanced application templates are pre-configured to use asset-packagist by default, so you can skip this section.

    In the composer.json of your project, add the following lines:

    "repositories": [
        {
            "type": "composer",
            "url": "https://asset-packagist.org"
        }
    ]
    

    Adjust @npm and @bower aliases in you application configuration:

    $config = [
        ...
        'aliases' => [
            '@bower' => '@vendor/bower-asset',
            '@npm'   => '@vendor/npm-asset',
        ],
        ...
    ];
    

    Visit asset-packagist.org to know, how it works.

提交回复
热议问题