magento2 - 为什么我在 magento 2 中的编译时出错
问题描述
setup:di:compile
执行命令时出现此错误
$ php bin/magento s:d:c
PHP Fatal error: Uncaught Error: Cannot instantiate interface Symfony\Component\Console\Output\OutputInterface in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
Stack trace:
#0 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Symfony\\Compone...', Array)
#1 vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Symfony\\Compone...')
#2 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Symfony\\Compone...')
#3 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\F in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116
Fatal error: Uncaught Error: Cannot instantiate interface Symfony\Component\Console\Output\OutputInterface in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php:116
Stack trace:
#0 vendor/magento/framework/ObjectManager/Factory/Compiled.php(108): Magento\Framework\ObjectManager\Factory\AbstractFactory->createObject('Symfony\\Compone...', Array)
#1 vendor/magento/framework/ObjectManager/ObjectManager.php(70): Magento\Framework\ObjectManager\Factory\Compiled->create('Symfony\\Compone...')
#2 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(160): Magento\Framework\ObjectManager\ObjectManager->get('Symfony\\Compone...')
#3 vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(246): Magento\Framework\ObjectManager\F in vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 116
解决方案
我的问题是由于任何自定义模块 di.xml 文件如果您的界面仍然无法加载,请检查您的 di.xml 并验证首选项是否可用。我希望您了解我想向您解释的信息检查链接抽象实现映射主题 https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/di-xml-file。 html
推荐阅读
- reactjs - 如何使用 Antd 和内置 scss 配置 Next.js 并为 pwa 构建?
- javascript - CORS 策略已阻止从源 '' 访问 '' 处的 XMLHttpRequest:不存在“Access-Control-Allow-Origin”标头
- javascript - 多文件上传 HTML / CSS / JS
- python - 关于避免“错误:安装了模块1 somenumber,但 {'module2'} 需要 module1>=somenumbergreaterthansomenumber”
- python - 仅包括一个 id 有 2 个标志的 id (PANDAS)
- c# - 为什么我在控制器中的 Nest 方法会创建索引?
- javascript - 如何添加标签 JS
- sql - 在带有 psql 的数组常量中
- azure - Microsoft 语音识别段落格式
- python - Selenium - Firefox 选项不生效