magento-cloud无法在app / etc中正确创建文件,Magento 2无法实例化

时间:2018-07-12 05:38:11

标签: magento2

我有一个Magento2 cloud pro设置。我已经按照Local environment setup

上的说明创建了本地开发环境

我的设置

Ubuntu 18.04服务器,Nginx,PHP FPM 7.1-来自Andre ppa,MariaDB

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

当我使用magento-cloud工具在新服务器上构建环境时,命令 magento-cloud build 创建了指向_www的新符号链接,但未创建在我的VM环境中。它还没有在app/etc目录中创建任何文件。在我的VM环境中,文件已创建。今天,我删除了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(Array,   \'Magento \\ Framewo ... \',NULL,\'cache \',   \'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-全部返回代码255

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

1 个答案:

答案 0 :(得分:0)

弄清楚了。 在运行命令magento-cloud build之前,需要运行composer update,这是创建文件的原因。不确定此步骤是否在文档中。