vitejs / vite

Next generation frontend tooling. It's fast!
http://vite.dev
MIT License
67.83k stars 6.11k forks source link

[vite-plugin-page-public] ENOENT: no such file or directory, copyfile¿ #13523

Closed ye-admin closed 1 year ago

ye-admin commented 1 year ago

Describe the bug

本地开发完后,本地打包没问题,一到Jenkins打包就出错,回滚后,在Jenkins打包就不报错,但是本地开发玩的代码,运行不报错,打包不报错

Reproduction

1

Steps to reproduce

No response

System Info

1

Used Package Manager

pnpm

Logs

[vite-plugin-page-public] ENOENT: no such file or directory, copyfile '/root/.jenkins/workspace/react-vite-template_develop_compile/src/pages/p-cnpc/_public/manifest.json' -> '/root/.jenkins/workspace/react-vite-template_develop_compile/dist/manifest.json' error during build: Error: ENOENT: no such file or directory, copyfile '/root/.jenkins/workspace/react-vite-template_develop_compile/src/pages/p-cnpc/_public/manifest.json' -> '/root/.jenkins/workspace/react-vite-template_develop_compile/dist/manifest.json' at Object.copyFileSync (node:fs:2852:3) at Object.closeBundle (/root/.jenkins/workspace/react-vite-template_develop_compile/vite.config.ts:85:176) at file:///root/.jenkins/workspace/react-vite-template_develop_compile/node_modules/rollup/dist/es/shared/rollup.js:22748:40 at async Promise.all (index 0) at async PluginDriver.hookParallel (file:///root/.jenkins/workspace/react-vite-template_develop_compile/node_modules/rollup/dist/es/shared/rollup.js:22676:9) at async file:///root/.jenkins/workspace/react-vite-template_develop_compile/node_modules/rollup/dist/es/shared/rollup.js:23738:13 at async catchUnfinishedHookActions (file:///root/.jenkins/workspace/react-vite-template_develop_compile/node_modules/rollup/dist/es/shared/rollup.js:23126:20) at async rollupInternal (file:///root/.jenkins/workspace/react-vite-template_develop_compile/node_modules/rollup/dist/es/shared/rollup.js:23727:5) at async doBuild (file:///root/.jenkins/workspace/react-vite-template_develop_compile/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:45705:24) at async build (file:///root/.jenkins/workspace/react-vite-template_develop_compile/node_modules/vite/dist/node/chunks/dep-5605cfa4.js:45543:16) at async CAC. (file:///root/.jenkins/workspace/react-vite-template_develop_compile/node_modules/vite/dist/node/cli.js:756:9) error Command failed with exit code 1.¿¿

Validations

ye-admin commented 1 year ago

vite Version 3.2.5

bluwy commented 1 year ago

Closing as there's no reproduction given, and it seems to be an issue with vite-plugin-page-public