Laravel 6.0 中未定义命令“ui”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/57857489/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Command 'ui' is not defined in laravel 6.0
提问by Curious K
I start a new project in laravel but my composer installed a fresh version of laravel 6.0.1.
我在 laravel 中开始了一个新项目,但我的作曲家安装了一个新版本的 laravel 6.0.1。
Php artisan make:auth
command can't work.
Php artisan make:auth
命令无法工作。
I try many times but error can't remove
我尝试了很多次但错误无法删除
composer require laravel/ui
installed but when I use the second command:
安装但是当我使用第二个命令时:
php artisan ui vue --auth
then system show me this message:
然后系统向我显示此消息:
Command "ui" is not defined.
Using version ^1.0 for laravel/ui
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.
回答by Curious K
you can try this:
你可以试试这个:
C:\Whatever\Your_project_name>composer require laravel/ui
and
和
C:\Whatever\Your_project_name>php artisan ui vue --auth
Just this two inside your project folder.I am using vue but you can try other ones too.
在你的项目文件夹中只有这两个。我正在使用 vue,但你也可以尝试其他的。
回答by Kenny Horna
Did you install the dependency? To run that command you need to install an additional package:
你安装依赖了吗?要运行该命令,您需要安装一个额外的包:
composer require laravel/ui
After this you should be able to run one of these commands:
在此之后,您应该能够运行以下命令之一:
php artisan ui bootstrap
php artisan ui vue
php artisan ui react
In case you need the auth views, you could:
如果您需要身份验证视图,您可以:
php artisan ui bootstrap --auth
php artisan ui vue --auth
php artisan ui react --auth
Don't forget to run this after:
不要忘记在以下之后运行它:
npm install
回答by f-filip
run "composer require laravel/ui 1" instead of "composer require laravel/ui"
运行“composer require laravel/ui 1”而不是“composer require laravel/ui”
laravel 6 works with version 1.0, it written in docs "Want to get started fast? Install the laravel/ui (1.0)"
laravel 6 适用于 1.0 版,它写在文档“想要快速入门?安装 laravel/ui (1.0)”