简体   繁体   中英

Just started new project and when I run npm run dev it throws an error in the terminal

$ npm run dev

vite-project@0.0.0 dev vite

node:events:346 throw er; // Unhandled 'error' event ^

Error: spawn C:\Users\cottamcha\Desktop\Code\portforlio\vite-project\node_modules\esbuild\esbuild.exe ENOENT at Process.ChildProcess._handle.onexit (node:internal/child_process:282:19) at onErrorNT (node:internal/child_process:480:16) at processTicksAndRejections (node:internal/process/task_queues:81:21) Emitted 'error' event on ChildProcess instance at: at Process.ChildProcess._handle.onexit (node:internal/child_process:288:12) at onErrorNT (node:internal/child_process:480:16) at processTicksAndRejections (node:internal/process/task_queues:81:21) { errno: -4058, code: 'ENOENT', syscall: 'spawn C:\Users\cottamcha\Desktop\Code\portforlio\vite-project\node_modules\esbuild\esbuild.exe', path: 'C:\Users\cottamcha\Desktop\Code\portforlio\vite-project\node_modules\esbuild\esbuild.exe', spawnargs: [ '--service=0.11.23', '--ping' ] }

Try running: node./node_modules/esbuild/install.js

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM