Reputation: 151
I have worked in Yii 1 and now trying to use Yii2. I have installed composer and then installed basic app. But now I am getting this error when I try to access the basic app. How can I solve this issue?
Error is:
Unknown Method – yii\base\UnknownMethodException
Calling unknown method: yii\web\UrlManager::addRules()
Upvotes: -1
Views: 2932
Reputation: 19
Check your composer.json file. Section 'extra' should contain
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
then run composer global require "fxp/composer-asset-plugin:1.0.*@dev"
and composer update
it helped me
Upvotes: -1
Reputation: 10328
ok I solved the problem installing yii2 in this way :
composer global require "fxp/composer-asset-plugin:1.0.*@dev"
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
Upvotes: -1