2amigos / yii2-usuario

Highly customizable and extensible user management, authentication, and authorization Yii2 extension
https://github.com/2amigos/yii2-usuario
Other
294 stars 142 forks source link

'Invalid path alias: @Da/User/Migration' #376

Open yasanchez opened 4 years ago

yasanchez commented 4 years ago

Hello greetings, I am trying to use the yii2-usuario extension following the steps indicated on the page: https://yii2-usuario.readthedocs.io/en/latest/installation/yii2-application-template/ Step 1 - Install the Application template I have installed "fxp / composer-asset-plugin: ^ 1.4.1" Create the project with: composer create-project --prefer-dist --stability = dev 2 friends/yii2-app-template friends Step 2 - Configure your application I have the user.php file in the config/web/modules folder with the code: <? php return [ 'class' => Da\User\Module :: class ]; Step 3 - Apply database schema migrations When executing the migration: ./yii migrate --migrationNamespaces=Da\User\Migration I get following error: Exception 'yii\base\InvalidArgumentException' with message 'Invalid path alias:@Da/User/Migration'

Could you advise me with this problem.

maxxer commented 4 years ago

Your info are a bit messy. From the last command you posted it looks like you didn't install the extension. I'd suggest you to retry from scratch and eventually collect and post the full install command output, if problem persists

juppwerner commented 4 years ago

I think this is related to wrong double backslashes in the documentation at Read the docs: yii2-usuario.

The correct command should read:

./yii migrate --migrationNamespaces=Da\User\Migration