[vite:terser] terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.
error during build:
Error: terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.
at loadTerserPath (file:///D:/Tool/nodejs/node_global/node_modules/vite/dist/node/chunks/dep-51c4f80a.js:13758:19)
at Object.renderChunk (file:///D:/Tool/nodejs/node_global/node_modules/vite/dist/node/chunks/dep-51c4f80a.js:13794:32)
at file:///D:/Tool/nodejs/node_global/node_modules/vite/node_modules/rollup/dist/es/shared/rollup.js:22748:40
at processTicksAndRejections (node:internal/process/task_queues:96:5)
解决
> npm i terser --legacy--peer-deps
标签:node,Since,v3,terser,found,vite From: https://www.cnblogs.com/zhian/p/16987335.html