You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

升级Sulu CMS 2.4.20后因core.js问题无法构建管理端JS

构建Sulu CMS 2.4.20管理端JS时遭遇JSRoutingBundle顽固错误

近期将项目升级到Sulu CMS 2.4.20(已知版本已过时),手动构建管理端JS时,遇到与jsrouting-bundle相关的错误,具体报错如下:

Build administration interface assets
-------------------------------------


> sulu-skeleton@ build /assets/admin
> webpack --mode production

   1406 modules

WARNING in ./node_modules/sulu-admin-bundle/services/ResourceRequester/registries/resourceRouteRegistry.js 28:4-18
"export 'default' (imported as 'symfonyRouting') was not found in 'fos-jsrouting/router'

WARNING in ./node_modules/sulu-admin-bundle/services/ResourceRequester/registries/resourceRouteRegistry.js 41:11-25
"export 'default' (imported as 'symfonyRouting') was not found in 'fos-jsrouting/router'

WARNING in ./node_modules/sulu-admin-bundle/services/ResourceRequester/registries/resourceRouteRegistry.js 51:11-25
"export 'default' (imported as 'symfonyRouting') was not found in 'fos-jsrouting/router'

WARNING in ./node_modules/sulu-media-bundle/containers/ImageMap/ImageRenderer.js 97:11-25
"export 'default' (imported as 'symfonyRouting') was not found in 'fos-jsrouting/router'

WARNING in ./node_modules/sulu-admin-bundle/stores/metadataStore/metadataStore.js 27:18-32
"export 'default' (imported as 'symfonyRouting') was not found in 'fos-jsrouting/router'

WARNING in ./node_modules/sulu-admin-bundle/containers/Badge/stores/BadgeStore.js 88:11-25
"export 'default' (imported as 'symfonyRouting') was not found in 'fos-jsrouting/router'

WARNING in ./node_modules/sulu-admin-bundle/views/List/toolbarActions/UploadToolbarAction.js 154:11-25
"export 'default' (imported as 'symfonyRouting') was not found in 'fos-jsrouting/router'

ERROR in /vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.js
Module not found: Error: Can't resolve 'core-js/modules/es.array.push.js' in '/Users/andreas/Workdata/DWBN-IT/sulu/sulu/vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js'

ERROR in /vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.js
Module not found: Error: Can't resolve 'core-js/modules/esnext.iterator.constructor.js' in '/Users/andreas/Workdata/DWBN-IT/sulu/sulu/vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js'

ERROR in /vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js/router.js
Module not found: Error: Can't resolve 'core-js/modules/esnext.iterator.for-each.js' in '/Users/andreas/Workdata/DWBN-IT/sulu/sulu/vendor/friendsofsymfony/jsrouting-bundle/Resources/public/js'

[ERROR] Unexpected error while building administration interface assets. 

已尝试的解决方案

  • 按照Sulu官方文档中列出的所有常见错误解决方案操作,问题仍未解决
  • 将core-js从3.39.0降级至3.18.0(修改babel.config.json配置),无效

环境信息

  • node: v14.21.3
  • npm: 6.14.18
  • core-js: 3.39.0(曾降级至3.18.0)

寻求可行的技术解决方案。

内容的提问来源于stack exchange,提问作者Andreas

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.16 19:52:05