Online Search a lot of answers, basically is to let you in Composer.json inside add such a passage:
"extra": { "asset-installer-paths": { "npm-asset-library": "vendor/npm", "bower-asset-library": "vendor/bower", "npm-searchable": false, "bower-searchable": false } }
Because oneself also is not very clear what reason, I like this to follow the operation, but how to do not, still will report the same mistake! Just learn Yii2, a lot of things still do not understand, encountered such a problem really TM egg pain,,,
Toss for a long time, later on the official web search for such a paragraph, hold the mentality of try, still really solved!!
First: If your project is named MyProject, use Composer in your project root (right-click->use Composer here)
My English is not good, the following is not translated, the original is as follows:
Step1:composer global require "fxp/composer-asset-plugin:1.0.* @dev"
Step2:composer create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced MyProject
Step3:copy and past to Composer.json @ ' require ', then run composer--prefer-dist Update:
"Bower-asset/jquery": "@stable",
"Bower-asset/bootstrap": "@stable",
"Bower-asset/jquery-ui": "@stable",
"Bower-asset/jquery.inputmask": "@stable",
"Bower-asset/punycode": "@stable"
Step4:run composer--prefer-dist Update
Then refresh the project in the browser, everything OK.
YII2 Composer Update error: calling unknown Method:yii\web\urlmanager::addrules ()