An error is reported in vite build #6409
liu-code-hs posted onGitHub
Describe the bug / 问题描述
vite版本:4.2
node版本16.16
运行yarn build
时,
报错信息:[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/insightarch-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/insightarch-fe/node_modules/rollup/dist/es/shared/node-entry.js:2287:30)
at renderNamePattern (file:///Users/Documents/project/insightarch-fe/node_modules/rollup/dist/es/shared/node-entry.js:15665:16)
at Chunk.getPreliminaryFileName (file:///Users/Documents/project/insightarch-fe/node_modules/rollup/dist/es/shared/node-entry.js:15965:24)
at reserveEntryChunksInBundle (file:///Users/Documents/project/insightarch-fe/node_modules/rollup/dist/es/shared/node-entry.js:17695:19)
at renderChunks (file:///Users/Documents/project/insightarch-fe/node_modules/rollup/dist/es/shared/node-entry.js:17681:5)
at Bundle.generate (file:///Users/Documents/project/insightarch-fe/node_modules/rollup/dist/es/shared/node-entry.js:17922:19)
at async file:///Users/Documents/project/insightarch-fe/node_modules/rollup/dist/es/shared/node-entry.js:26785:27
at async catchUnfinishedHookActions (file:///Users/Documents/project/insightarch-fe/node_modules/rollup/dist/es/shared/node-entry.js:25910:16)
at async serialBundleWorkerEntry (file:///Users/Documents/project/insightarch-fe/node_modules/vite/dist/node/chunks/dep-41cf5ffd.js:42533:61)
Reproduction link / 重现链接
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