gpt4 book ai didi

javascript - Shopware 管理模块在管理后未显示 :build

转载 作者:行者123 更新时间:2023-12-04 02:26:42 24 4
gpt4 key购买 nike

我正在构建一个带有部分店面和部分管理的 Shopware 插件。店面部分工作正常,但我无法使用管理:构建命令让管理部分显示在管理页面的菜单中。
我按照 Shopware Docs 和 Shopware 类(class)了解如何执行此操作。我匹配了他们两个,但仍然没有成功。可能有什么我在这里想念的吗?
这是我导入插件文件夹的 main.js 文件。

import './module/configurator';
这是我注册插件的插件文件夹中的 index.js 文件
import './page/configurator-component-list';
import './page/configurator-component-detail';
import './page/configurator-component-create';

Shopware.Module.register('configurator', {
type: 'plugin',
name: 'Configurator',
color: '#ff3d58',
icon: 'default-shopping-paper-bag-product',
title: 'Configurator',
description: 'Module for registering components',

routes: {
index: {
component: 'configurator-component-list',
path: 'index'
},
detail: {
component: 'configurator-component-detail',
path: 'detail/:id',
meta: {
parentPath: 'configurator.index'
}
},
create: {
component: 'configurator-component-create',
path: 'create',
meta: {
parentPath: 'configurator.index'
}
}
},

navigation: [{
label: 'Configurator',
color: '#ff3d58',
path: 'configurator.index',
icon: 'default-shopping-paper-bag-product',
parent: 'sw-catalogue',
position: 100
}],
});
以防万一我的文件树有问题,这里是
- administration
- src
- module
- configurator
- page (includes the different components of the plugin)
- index.js
- main.js
- storefront
- src
管理输出:build
Starting Execution of 'administration:build' ('/var/www/html/dev-ops/administration/actions/build.sh')


(1/3) Starting
> bin/console bundle:dump
Cannot load Xdebug - it was already loaded

[OK] Dumped plugin configuration.


(2/3) Starting
> PROJECT_ROOT=/var/www/html ENV_FILE=/var/www/html/.env npm run --prefix vendor/shopware/platform/src/Administration/Resources/app/administration/ build

> administration@1.0.0 build /var/www/html/vendor/shopware/platform/src/Administration/Resources/app/administration
> mode=production webpack

# Compiling with Webpack configuration
# Production mode is activated 🚀
# Plugin "Storefront": Injected successfully
# Plugin "PCvue": Injected successfully

Time: 50301ms

Entrypoint commons = static/js/runtime.js static/css/vendors-node.css static/js/vendors-node.js static/js/vendors-node.js.map static/js/commons.js
Entrypoint app = static/js/runtime.js static/css/vendors-node.css static/js/vendors-node.js static/js/vendors-node.js.map static/css/app.css static/js/app.js
Entrypoint storefront = static/js/runtime.js static/css/vendors-node.css static/js/vendors-node.js static/js/vendors-node.js.map static/css/storefront.css static/js/storefront.js
Entrypoint p-cvue = static/js/runtime.js static/js/p-cvue.js
3847 modules

(3/3) Starting
> bin/console assets:install
Cannot load Xdebug - it was already loaded
Copying files for bundle: FrameworkBundle
Copying files for bundle: MonologBundle
Copying files for bundle: SwiftmailerBundle
Copying files for bundle: SensioFrameworkExtraBundle
Copying files for bundle: TwigBundle
Copying files for bundle: WebProfilerBundle
Copying files for bundle: DebugBundle
Copying files for bundle: EnqueueBundle
Copying files for bundle: EnqueueAdapterBundle
Copying files for bundle: Framework
Copying files for bundle: System
Copying files for bundle: Content
Copying files for bundle: Checkout
Copying files for bundle: Profiling
Copying files for bundle: Administration
Copying files for bundle: Docs
Copying files for bundle: Storefront
Copying files for bundle: Elasticsearch
Copying files for bundle: PCvue
Copying files for bundle: DbalKernelPluginLoader

[OK] Successfully copied all bundle files


Duration: 1m 1s
All commands successfully executed!

最佳答案

我终于(!!)发现了问题。对于任何想知道问题所在的人。
在 index.js 中,您需要添加片段:

snippets: {
'de-DE': deDE,
'en-GB': enGB
},
我以前有过这个,但由于我还没有使用片段,所以我删除了它们。但这就是问题所在。
它们不能只包含 { }他们需要至少包含插件名称
{
'plugin-name': {

}
}
没有它们,它将无法正确安装,因此不会显示在菜单中。幸运的是,他们没有给你一个解释一切的错误信息;)

关于javascript - Shopware 管理模块在管理后未显示 :build,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67104438/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com