antvis/G6

vite build error #6410

liu-code-hs posted onGitHub

Describe the bug / 问题描述

本地yarn dev可以正常编译,但是运行yarn build时报错: vite版本:4.2, node: 16.16
@antv/g6: "^5.0.23",

报错信息: [commonjs--resolver] Invalid pattern "/[name]-[hash].js" for "output.entryFileNames", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern. file: /Users/Documents/project/insight-fe/node_modules/@antv/layout/lib/supervisor.js error during build: RollupError: Invalid pattern "/[name]-[hash].js" for "output.entryFileNames", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern. at error (file:///Users/Documents/project/insight-fe/node_modules/rollup/dist/es/shared/node-entry.js:2287:30) at renderNamePattern (file:///Users/Documents/project/insight-fe/node_modules/rollup/dist/es/shared/node-entry.js:15665:16) at Chunk.getPreliminaryFileName (file:///Users/Documents/project/insight-fe/node_modules/rollup/dist/es/shared/node-entry.js:15965:24) at reserveEntryChunksInBundle (file:///Users/Documents/project/insight-fe/node_modules/rollup/dist/es/shared/node-entry.js:17695:19) at renderChunks (file:///Users/Documents/project/insight-fe/node_modules/rollup/dist/es/shared/node-entry.js:17681:5) at Bundle.generate (file:///Users/Documents/project/insight-fe/node_modules/rollup/dist/es/shared/node-entry.js:17922:19) at async file:///Users/Documents/project/insight-fe/node_modules/rollup/dist/es/shared/node-entry.js:26785:27 at async catchUnfinishedHookActions (file:///Users/Documents/project/insight-fe/node_modules/rollup/dist/es/shared/node-entry.js:25910:16) at async serialBundleWorkerEntry (file:///Users/Documents/project/insight-fe/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:42533:61)

No response

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

No response

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

macOS

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


https://g6-next.antv.antgroup.com/manual/further-reading/bundle, @Aarebecca 您好,这个链接已经失效

posted by liu-code-hs 6 months ago

Fund this Issue

$0.00
Funded

Pull requests