1

I have a site running Craft 3.6.11.1. I've been working on it for a while, have multi environment config set up and everything working great. I have recently installed and uninstalled quite a few plugins. I'm not sure exactly when something went wrong but now in terminal when I do ./craft I get:

Exception 'yii\base\InvalidArgumentException' with message 'Invalid path alias: @'

in /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/BaseYii.php:154

Stack trace:
#0 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/base/Module.php(257): yii\BaseYii::getAlias('@')
#1 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(245): yii\base\Module->getControllerPath()
#2 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(240): yii\console\controllers\HelpController->getModuleCommands(Object(modules\sitemodule\SiteModule))
#3 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(172): yii\console\controllers\HelpController->getModuleCommands(Object(craft\console\Application))
#4 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(192): yii\console\controllers\HelpController->getCommands()
#5 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(292): yii\console\controllers\HelpController->getCommandDescriptions()
#6 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(67): yii\console\controllers\HelpController->getDefaultHelp()
#7 [internal function]: yii\console\controllers\HelpController->actionIndex(NULL)
#8 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\InlineAction->runWithParams(Array)
#10 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/Controller.php(184): yii\base\Controller->runAction('', Array)
#11 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/base/Module.php(534): yii\console\Controller->runAction('', Array)
#12 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/Application.php(181): yii\base\Module->runAction('', Array)
#13 /srv/users/serverpilot/apps/dev-odette-craft/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application->runAction('', Array)
#14 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/Application.php(148): craft\console\Application->runAction('', Array)
#15 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/base/Application.php(392): yii\console\Application->handleRequest(Object(craft\console\Request))
#16 /srv/users/serverpilot/apps/dev-odette-craft/craft(22): yii\base\Application->run()
#17 {main}

Any ideas on how to fix this would be much appreciated.

2
  • 1
    Whenever I hit something like this, the first thing I do is delete the entire vendor folder and re-install with composer install, clear out all Craft cache, and try again. Have you given that a go? – Tammy Shipps Mar 26 at 17:15
  • I have. Still the same error :( – Tim Print Mar 29 at 8:38
2

This was an error in a module I have built for this site. Going through the docs and some tutorials again fixed it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.