Under Windows 10 64, PHP 7.0.22, run Yii 2.0.12, the prompt: The file or directory to be published does not exist: E:\wwwroot\yii2-app-advanced/vendor\bower/jquery/dist
1. Open the URL:http://www.yii2-app-advanced.dev/, the error 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 directory bower does not exist, as shown in Figure 2
3. Check the composer installation prompt and find that the bower has been replaced with the bower-asset directory, which is normal, as shown in Figure 3
4. Since I just upgraded from PHP 5.6.27 to PHP 7.0.22, I decided to reinstall the Composer Asset Plugin, 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 installation prompt of the composer, the files in the bower-asset directory are loaded from the cache, and the decision to clear the composer cache is determined, 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 is still prompted, only delete e:\wwwroot\yii2-app-advanced\vendor, and reinstall it, 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 the composer update, report an error, 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]#atfp_close_translate_span#.
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 more common problems.
11. 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 and execute 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/, normal, as shown in Figure 14
15. Summary: The cause of the error may have nothing to do with the Composer cache, but the version of the Composer Asset plugin.













