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

CC BY-SA 4.0
2021-03-29T09:07:29.590Z
2021-03-29T09:07:29.590Z
Tim Print
<p>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:</p>
<pre><code>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-&gt;getControllerPath()
#2 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(240): yii\console\controllers\HelpController-&gt;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-&gt;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-&gt;getCommands()
#5 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(292): yii\console\controllers\HelpController-&gt;getCommandDescriptions()
#6 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/controllers/HelpController.php(67): yii\console\controllers\HelpController-&gt;getDefaultHelp()
#7 [internal function]: yii\console\controllers\HelpController-&gt;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-&gt;runWithParams(Array)
#10 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/Controller.php(184): yii\base\Controller-&gt;runAction('', Array)
#11 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/base/Module.php(534): yii\console\Controller-&gt;runAction('', Array)
#12 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/Application.php(181): yii\base\Module-&gt;runAction('', Array)
#13 /srv/users/serverpilot/apps/dev-odette-craft/vendor/craftcms/cms/src/console/Application.php(89): yii\console\Application-&gt;runAction('', Array)
#14 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/console/Application.php(148): craft\console\Application-&gt;runAction('', Array)
#15 /srv/users/serverpilot/apps/dev-odette-craft/vendor/yiisoft/yii2/base/Application.php(392): yii\console\Application-&gt;handleRequest(Object(craft\console\Request))
#16 /srv/users/serverpilot/apps/dev-odette-craft/craft(22): yii\base\Application-&gt;run()
#17 {main}
</code></pre>
<p>Any ideas on how to fix this would be much appreciated.</p>

CC BY-SA 4.0
2021-03-26T17:15:50.377Z
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
CC BY-SA 4.0
2021-03-29T08:38:59.083Z
I have. Still the same error :(
Tim Print
<craft3>
Invalid path alias: @ error
# Invalid path alias: @ error

(Asked by: username_0 on 2021-03-26)

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.

**Tags:** craft3
> **Comments:**
> **username_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?  
> **username_0**: I have. Still the same error :(  

---

## 1 answers

### Answer by username_0 on 2021-03-29. Score: 2

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


---

