mongodb 升级出现以下报错:Exception 'yii\di\NotInstantiableException' with message 'Failed to instantiate component or class "yii\mongodb\console\controllers\MigrateController"

bug问题 · qinfaye · 于 2年前 发布 · 1839 次阅读

Fecmall-2.x 升级-通过Migrate升级数据库部分-mongodb 升级:./yii mongodb-migrate --interactive=0 --migrationPath=@fecshop/migrations/mongodb

出现以下报错信息:请问是什么原因? Exception 'yii\di\NotInstantiableException' with message 'Failed to instantiate component or class "yii\mongodb\console\controllers\MigrateController".'

in /www/wwwroot/www.zhouka.com/vendor/yiisoft/yii2/di/Container.php:510

Caused by: Exception 'ReflectionException' with message 'Class yii\mongodb\console\controllers\MigrateController does not exist'

in /www/wwwroot/www.zhouka.com/vendor/yiisoft/yii2/di/Container.php:508

共收到 3 条回复
Fecmall#12年前 0 个赞

1.如果你使用默认的,只需要默认的mysql即可,不需要mongodb

2.你这个报错,是没有安装yii2的mongodb扩展。如果使用mongodb?参看文档:https://www.fecmall.com/doc/fecshop-guide/develop/cn-2.0/guide-fecshop-2-use-mongo.html

qinfaye#22年前 0 个赞

好,非常感谢。 针对这个问题补问,我就是计划使用默认的mysql,是不是目前这两个报错就不用管了,

Fecmall#32年前 0 个赞

@qinfaye #2楼 如果你只使用mysql,只执行mysql的那个migrate就可以了,mongodb的那个不需要执行。

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics