-1

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()

halfer
  • 19,824
  • 17
  • 99
  • 186
Awais Mustafa
  • 151
  • 2
  • 9

2 Answers2

-1

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

iltaf khalid
  • 9,928
  • 5
  • 30
  • 34
-1

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

Artem
  • 19
  • 4