1. Open the URL: http://www.yii2-app-advanced.dev/ , and an error reports that the directory: E:\wwwroot\yii2-app-advanced/vendor\bower/jquery/dist does not exist, as shown in Figure 1

2. Open E:\wwwroot\yii2-app-advanced\vendor and confirm that the bower directory does not exist, as shown in Figure 2

3. Check the Composer installation output and find that bower has already been replaced by the bower-asset directory; this is normal, as shown in Figure 3

4. Since I had just upgraded from PHP 5.6.27 to PHP 7.0.22, I decided to reinstall the Composer asset plugin, but there was no update, as shown in Figure 4

5. Check the composer.json file and find “bower-asset-library”: “vendor/bower”, as shown in Figure 5

6. Check the Composer installation output; the files in the bower-asset directory are loaded from the cache, so I decide to clear the Composer cache, as shown in Figure 6

7. Delete E:\wwwroot\yii2-app-advanced and reinstall, as shown in Figure 7
composer global require “fxp/composer-asset-plugin:^1.2.0”
composer create-project yiisoft/yii2-app-advanced yii2-app-advanced 2.0.12

8. The error still occurs, so I only delete E:\wwwroot\yii2-app-advanced\vendor and reinstall, as shown in Figure 8
composer install

9. Reinstall the Composer asset plugin, version 1.3.1, as shown in Figure 9
composer global require “fxp/composer-asset-plugin:^1.3.1”

10. Run composer update, and an error occurs, as shown in Figure 10
Problem 1
– yiisoft/yii2 2.0.9 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
– yiisoft/yii2 2.0.8 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package
found.
– yiisoft/yii2 2.0.7 requires bower-asset/jquery 2.2.*@stable | 2.1.*@stable | 1.11.*@stable -> no matching package
found.
– yiisoft/yii2 2.0.6 requires bower-asset/jquery 2.1.*@stable | 1.11.*@stable -> no matching package found.
– yiisoft/yii2 2.0.12 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
– yiisoft/yii2 2.0.11.2 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
– yiisoft/yii2 2.0.11.1 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
– yiisoft/yii2 2.0.11 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
– yiisoft/yii2 2.0.10 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
– yiisoft/yii2 2.0.12 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
– Installation request for yiisoft/yii2 ~2.0.6 -> satisfiable by yiisoft/yii2[2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.
0.12, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
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://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

11. The directory E:\wwwroot\yii2-app-advanced\vendor\bower is generated, but the directory is empty, as shown in Figure 11

12. Clear the Composer cache again by running the command: composer clear-cache, as shown in Figure 12

13. Delete E:\wwwroot\yii2-app-advanced and reinstall, as shown in Figure 13
composer global require “fxp/composer-asset-plugin:^1.3.1”
composer create-project –prefer-dist yiisoft/yii2-app-advanced yii2-app-advanced

14. Open the URL: http://www.yii2-app-advanced.dev/ , and it works normally, as shown in Figure 14

15. Conclusion: The cause of the error might not be related to the Composer cache, but rather to the version of the Composer asset plugin.
