0
点赞
收藏
分享

微信扫一扫

thinkphp6 通过命令行快速生成多应用模块报 【Command “build“ is not defined.】错误的解决办法

gy2006_sw 2022-06-06 阅读 21

在项目下执行如下命令

php think build admin

报如下错误


[root@localhost orange]# php think build admin [InvalidArgumentException] Command "build" is not defined.

解决办法:
1.查看官方文档: https://www.kancloud.cn/manual/thinkphp6_0/1037643

文档里说:
thinkphp6 通过命令行快速生成多应用模块报 【Command “build“ is not defined.】错误的解决办法_symfony所以我命通过命令安装扩展:

composer require topthink/think-multi-app

出现如下图说明安装成功了


Loading composer repositories with package information Updating dependencies Lock file operations: 16 installs, 0 updates, 0 removals - Locking league/flysystem (1.1.5) - Locking league/flysystem-cached-adapter (1.1.0) - Locking league/mime-type-detection (1.7.0) - Locking psr/cache (1.0.1) - Locking psr/container (1.1.1) - Locking psr/log (1.1.4) - Locking psr/simple-cache (1.0.1) - Locking symfony/polyfill-mbstring (v1.23.1) - Locking symfony/polyfill-php72 (v1.23.0) - Locking symfony/polyfill-php80 (v1.23.1) - Locking symfony/var-dumper (v4.4.27) - Locking topthink/framework (v6.0.9) - Locking topthink/think-helper (v3.1.5) - Locking topthink/think-multi-app (v1.0.14) - Locking topthink/think-orm (v2.0.44) - Locking topthink/think-trace (v1.4) Writing lock file Installing dependencies from lock file (including require-dev) Package operations: 1 install, 0 updates, 0 removals - Downloading topthink/think-multi-app (v1.0.14) - Installing topthink/think-multi-app (v1.0.14): Extracting archive 13 package suggestions were added by new dependencies, use `composer suggest` to see details. Generating autoload files > @php think service:discover Succeed! > @php think vendor:publish File /root/orange/config/trace.php exist! Succeed!

然后再此执行如下命令即可:


[root@localhost orange]# php think build admin Successed

Successed 出现这个说明大功告成,可以开始你的多应用开发之旅啦


举报

相关推荐

0 条评论