Error: Invalid Argument – [yii\base\InvalidArgumentException]
- Yii 2.0.40
- PHP 7.4.9
- Composer 2.0.8
I try to:
- Remove “fxp/composer-asset-plugin” and add repository section in composer.json
- Add ‘aliases’ in config
- Delete .lock, delete vendor directory, clean composer cache & composer install
In conclusion jquery (JqueryAsset) aren’t available in “vendor/bower-asset/”
This issue always pop-up and the solutions seems to change from each one.
A quick way to solve this is by adding the
"yidas/yii2-bower-asset":"*", to your “required” array in composer.json.
There is also a solution changing the position of the array “asset-installer-paths”, which someone recommend to move it inside the “extra” array of composer.json, you can read the original script here: https://github.com/yiisoft/yii2/issues/10198#issuecomment-312615114
Bruno, thanks for your answer!
jquery has been installed, but other required libraries (like fontawesome) are not installed.
asset-installer-paths array inside extra
Similar problems already in another threads, see possible solution also e.g. here.