You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>[email protected] build /Users/mac/project/webpack_to_vite/vite-test
> vite build
The CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.vite v5.2.11 building for production...✓ 1 modules transformed.x Build failed in 70mserror during build:Error: [vite:esbuild-transpile] Transform failed with 1 error:vite-test.mjs:1:8: ERROR: Expected ";" but found "func"Expected ";" but found "func"1 | const t func = ()=>{ | ^2 | console.log('this is a function');;3 | };; at failureErrorWithLog (/Users/mac/project/webpack_to_vite/vite-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:1651:15) at /Users/mac/project/webpack_to_vite/vite-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:849:29 at responseCallbacks.<computed> (/Users/mac/project/webpack_to_vite/vite-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:704:9) at handleIncomingPacket (/Users/mac/project/webpack_to_vite/vite-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:764:9) at Socket.readFromStdout (/Users/mac/project/webpack_to_vite/vite-test/node_modules/.pnpm/[email protected]/node_modules/esbuild/lib/main.js:680:7) at Socket.emit (node:events:517:28) at addChunk (node:internal/streams/readable:368:12) at readableAddChunk (node:internal/streams/readable:341:9) at Readable.push (node:internal/streams/readable:278:10) at Pipe.onStreamRead (node:internal/stream_base_commons:190:23) ELIFECYCLE Command failed with exit code 1.
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Describe the bug
The build failed on my computer, but the build was successful on stackblitz
Reproduction
https://stackblitz.com/edit/vitejs-vite-nmklt4?file=src%2Findex.js
Steps to reproduce
pnpm build
System Info
Used Package Manager
pnpm
Logs
Click to expand!
Validations
The text was updated successfully, but these errors were encountered: