如何为调试目的构建未限制的Shopware 6管理脚本?

发布于 2025-01-22 18:37:22 字数 1290 浏览 0 评论 0 原文

我想在尝试将自定义CMS组件保存在Shopware 6管理布局编辑器中时,请调试以下不是非常持久的错误消息:

An error was captured in current module: undefined
errorCaptured @ app.js?16504701226454027:1
Xe @ vendors-node.js?16504701221582962:2
(anonymous) @ vendors-node.js?16504701221582962:2
Promise.catch (async)
Ge @ vendors-node.js?16504701221582962:2
n @ vendors-node.js?16504701221582962:2
o._wrapper @ vendors-node.js?16504701221582962:2

在商店前面遇到此类问题时,我通常会修改build-store-storefront.sh以调用

npm -prefix“ $ {storefront_root}”/resources/resources/app/storefront Run Development

而不是

npm -prefix“ $”

现在,我想以类似的方式调整 build-administration.sh

原始行是

(cd“ $ {admin_root}”/resources/resources/app/appissimation&&& npm call--安装& amp; npm run构建)

将其更改为

(CD“ $ {admin_root}”/resources/app/appission&&& npm dev)

我会调用

“ dev”:“模式=开发WebPack-dev-server”,

vendor/shopware/shopware/resource/resources/resources/app/appission/package.json < /code>

我不想使用开发服务器,而是将其更改为

“ dev”:“ mode = development webpack”,

no build运行,但是我仍然得到一个缩小的应用程序。 JS 因此。

如何进一步调试最初的问题?

I would like to debug the following not-very-helpful error message when trying to save a custom CMS component in Shopware 6 administration layout editor:

An error was captured in current module: undefined
errorCaptured @ app.js?16504701226454027:1
Xe @ vendors-node.js?16504701221582962:2
(anonymous) @ vendors-node.js?16504701221582962:2
Promise.catch (async)
Ge @ vendors-node.js?16504701221582962:2
n @ vendors-node.js?16504701221582962:2
o._wrapper @ vendors-node.js?16504701221582962:2

When having such problems in the store front, I usually modify build-storefront.sh to call

npm --prefix "${STOREFRONT_ROOT}"/Resources/app/storefront run development

instead of

npm --prefix "${STOREFRONT_ROOT}"/Resources/app/storefront run production

Now I want to adapt build-administration.sh in a similar way:

The original line is

(cd "${ADMIN_ROOT}"/Resources/app/administration && npm clean-install && npm run build)

When I change it to

(cd "${ADMIN_ROOT}"/Resources/app/administration && npm install && mode=development npm run dev)

I would call

"dev": "mode=development webpack-dev-server",

vendor/shopware/administration/Resources/app/administration/package.json

I do not want to use the dev server and changed this to

"dev": "mode=development webpack",

No the build runs, but I still get a minified app.js as a result.

How can I debug the initial problem further?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文