输入
npm init @vitejs/app
并按照提示新建vue3项目后,进入项目目录
npm install
,再输入
npm run dev
发现报错,报错信息如下:
events.js:292
throw er; // Unhandled 'error' event
^
Error: spawn C:\Users\vite-vue-demo\node_module at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:274
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
errno: -4058,
code: 'ENOENT',
syscall: 'spawn C:\\Users\\\\vite-vue-demo\\les\\esbuild\\esbuild.exe',
path: 'C:\\Users\\Amusia\\Desktop\\智慧园区\\fbx-loader-demo\\node_moduild\\esbuild.exe',
spawnargs: [ '--service=0.12.5', '--ping' ]
}
PS C:\Users\\vite-vue-demo> node ./node_modules/nstall.js
Failed to install "esbuild-windows-64" using npm: Command failed: npm insglevel=error --prefer-offline --no-audit --progress=false esbuild-windows5
npm ERR! code ETARGET
npm ERR! notarget No matching version found for esbuild-windows-64@0.12.5
npm ERR! notarget In most cases you or one of your dependencies are reque
npm ERR! notarget a package version that doesn't exist.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\AppData\Local\npm-cache\_logs\2021-06-01T03_Z-debug.log
解决方法:
node ./node_modules/esbuild/install.js
版权声明:本文为weixin_43940777原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。