Skip to content

[Bug]: nextjs 上: Cannot read properties of undefined (reading 'MapNodeSize') #7164

@hustcc

Description

@hustcc

Describe the bug / 问题描述

Cannot read properties of undefined (reading 'MapNodeSize')
TypeError: Cannot read properties of undefined (reading 'MapNodeSize') at Module.MapNodeSize (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/transforms/index.js:8:121) at Module.MapNodeSize (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/exports.js:76:119) at Object.registerExportsForReactRefresh (webpack-internal:///./node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/next/dist/compiled/@next/react-refresh-utils/dist/internal/helpers.js:52:40) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/exports.js:179:35) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/exports.js:222:7) at ./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/exports.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:33967:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/transforms/get-edge-actual-ends.js:7:66) at ./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/transforms/get-edge-actual-ends.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:34748:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/transforms/index.js:17:79) at ./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/transforms/index.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:34759:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/registry/build-in.js:14:69) at ./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/registry/build-in.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:34473:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/preset.js:2:76) at ./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/preset.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:34462:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/index.js:116:65) at ./node_modules/.pnpm/@[email protected][email protected]/node_modules/@antv/g6/esm/index.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:33978:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ant-design/graphs/es/index.js:18:66) at ./node_modules/.pnpm/@[email protected][email protected][email protected][email protected]/node_modules/@ant-design/graphs/es/index.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:799:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@antv/gpt-vis/dist/esm/FishboneDiagram/index.js:4:76) at ./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@antv/gpt-vis/dist/esm/FishboneDiagram/index.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:35496:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@antv/gpt-vis/dist/esm/export.js:40:74) at ./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@antv/gpt-vis/dist/esm/export.js (http://local.alipay.net:3000/_next/static/chunks/new-components_chat_content_ChatCompletion_tsx.js:35925:1) at options.factory (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:736:31) at __webpack_require__ (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:37:33) at fn (http://local.alipay.net:3000/_next/static/chunks/webpack.js?ts=1748077055311:391:21) at eval (webpack-internal:///./node_modules/.pnpm/@[email protected]_@[email protected][email protected][email protected][email protected][email protected]/node_modules/@antv/gpt-vis/dist/esm/ChartCodeRender/index.js:13:65)

在 nextjs 里面启动最新版本的 5.0.48,直接报错。

大概猜测是 这个 pr 中 layout 版本升级带来的。

Reproduction link / 复现链接

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

Version / 版本

Please select / 请选择

OS / 操作系统

  • macOS
  • Windows
  • Linux
  • Others / 其他

Browser / 浏览器

  • Chrome
  • Edge
  • Firefox
  • Safari (Limited support / 有限支持)
  • IE (Nonsupport / 不支持)
  • Others / 其他

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions