webvimark / user-management

154 stars 163 forks source link

'./yii help' cause InvalidParamException #82

Open TrueXakeP opened 9 years ago

TrueXakeP commented 9 years ago
Exception 'yii\base\InvalidParamException' with message 'Invalid path alias: @webvimark/modules/UserManagement/controllers'

in C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\BaseYii.php:152

Stack trace:
#0 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\base\Module.php(237): yii\BaseYii::getAlias('@webvimark/modu...')
#1 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\controllers\HelpController.php(148): yii\base\Module->getControllerPath()
#2 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\controllers\HelpController.php(143): yii\console\controllers\HelpController->getModuleCommands(Object(webvimark
\modules\UserManagement\UserManagementModule))
#3 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\controllers\HelpController.php(77): yii\console\controllers\HelpController->getModuleCommands(Object(yii\consol
e\Application))
#4 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\controllers\HelpController.php(89): yii\console\controllers\HelpController->getCommands()
#5 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\controllers\HelpController.php(184): yii\console\controllers\HelpController->getCommandDescriptions()
#6 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\controllers\HelpController.php(67): yii\console\controllers\HelpController->getDefaultHelp()
#7 [internal function]: yii\console\controllers\HelpController->actionIndex(NULL)
#8 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\base\InlineAction.php(55): call_user_func_array(Array, Array)
#9 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\base\Controller.php(151): yii\base\InlineAction->runWithParams(Array)
#10 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\Controller.php(91): yii\base\Controller->runAction('', Array)
#11 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\base\Module.php(455): yii\console\Controller->runAction('', Array)
#12 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\Application.php(167): yii\base\Module->runAction('', Array)
#13 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\console\Application.php(143): yii\console\Application->runAction('', Array)
#14 C:\Users\root\Documents\PHPProj\emenu\vendor\yiisoft\yii2\base\Application.php(375): yii\console\Application->handleRequest(Object(yii\console\Request))
#15 C:\Users\root\Documents\PHPProj\emenu\yii(27): yii\base\Application->run()
#16 {main}

I avoid this by adding to console/config/main.php

return [
    ...
    'aliases' => [
        ...
        '@webvimark/modules/UserManagement' => '@vendor/webvimark/module-user-management',
    ],
];
dtmonterrey commented 8 years ago

@TrueXakeP thanks, this bug affected my cases with any invocation of ./yii