【问题标题】:magento-cloud did not properly create files in app/etc and Magento 2 cannot instantiatemagento-cloud 没有在 app/etc 中正确创建文件,Magento 2 无法实例化
【发布时间】:2018-12-20 05:37:54
【问题描述】:

我有一个 Magento2 云专业版设置。我已经按照Local environment setup上的说明创建了本地开发环境

我的设置

Ubuntu 18.04 服务器、Nginx、PHP FPM 7.1 - 来自 andre ppa、MariaDB

我的本​​地开发人员是几周前创建的虚拟机,直到昨天它都运行良好。我昨天还在物理硬件上从头开始制作了相同设置的副本,以进行从 1x 到 2x 的迁移。

当我使用 magento-cloud 工具在新服务器上构建环境时,magento-cloud build 命令创建了一个指向 _www 的新符号链接,该符号链接不是在我的 VM 环境中创建的。它也没有在app/etc 目录中创建任何文件。在我的 VM 环境中创建了文件。今天我删除了我的虚拟机盒子上的 Magento2 文件夹,它的行为与物理硬件相同。 app/etc 目录中没有创建任何文件,但之前它可以正常工作。

谁能确认这个问题?

文件未创建的结果产生错误:

[2018-07-12 04:02:44] 信息:输出:数组(0 =>'PHP 致命错误: 未捕获的错误:无法实例化接口 Magento\Framework\Config\CacheInterface 在 /home/magento/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php:50', 1 => '堆栈跟踪:',2 => '#0 /home/magento/magento2/vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Dynamic\Developer->create(\'Magento\\Framewo...\')', 3 => '#1 /home/magento/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(144): Magento\Framework\ObjectManager\ObjectManager->get(\'Magento\\Framewo...\')', 4 => '#2 /home/magento/magento2/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(230): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgument(数组, \'Magento\\Framewo...\',NULL,\'缓存\', \'Magento\\Framewo...\')', 5 => '#3 /home/magento/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): Magento\Framework\ObjectManager\Factory\AbstractFactory->resolveArgumentsInRuntime(\'Magento\\Framewo...\', Array, Array)', 6 => '#4 /home/magento/m in /home/magento/magento2/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php 在第 50' 行,) [2018-07-12 04:02:44] 关键:命令 php bin/magento module:enable --all 返回码 255

magento-cloud build第一次执行时,它100%无错误地完成,创建Magento文件夹结构等。如果我什么都不做,不做文件更改和再次执行相同的命令,由于缺少文件而失败。

【问题讨论】:

    标签: magento2


    【解决方案1】:

    想通了。 在运行命令 magento-cloud build 之前,需要运行 composer update,这是创建文件的内容。不确定此步骤是否在文档中。

    【讨论】:

      猜你喜欢
      • 2022-12-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多