npm run dev 报错 error: Unexpected "\x18"
根据官网的命令 yarn create @vitejs/app my-vue-app --template vue cd my-vue-app yarn yarn dev 启动报错
windows- 10 node - 14.17.0 npm - 6.14.13
package.json:1:0: error: Unexpected "\x18" 1 │ | ╵ ^
failed to load config from E:\my-vue-app\vite.config.js
error when starting dev server:
Error: Build failed with 1 error:
package.json:1:0: error: Unexpected "\x18"
at failureErrorWithLog (E:\my-vue-app\node_modules\esbuild\lib\main.js:1443:15)
at E:\my-vue-app\node_modules\esbuild\lib\main.js:1125:28
at runOnEndCallbacks (E:\my-vue-app\node_modules\esbuild\lib\main.js:915:63)
at buildResponseToResult (E:\my-vue-app\node_modules\esbuild\lib\main.js:1123:7)
at E:\my-vue-app\node_modules\esbuild\lib\main.js:1230:14
at E:\my-vue-app\node_modules\esbuild\lib\main.js:606:9
at handleIncomingPacket (E:\my-vue-app\node_modules\esbuild\lib\main.js:703:9)
at Socket.readFromStdout (E:\my-vue-app\node_modules\esbuild\lib\main.js:573:7)
at Socket.emit (events.js:376:20)
at addChunk (internal/streams/readable.js:309:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-vue-app@0.0.0 dev: vite
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-vue-app@0.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\chang.liu\AppData\Roaming\npm-cache_logs\2021-05-27T06_38_21_155Z-debug.log