vue vite启动项目报错ERROR: Unexpected “\x88“ in JSON 原因

简介: vue vite启动项目报错ERROR: Unexpected “\x88“ in JSON 原因

最近通过yarn dev启动vite项目时报了下面的错:


48c6314f0cf64c8eb2d39e51d3649c4b.png

failed to load config from F:\code\qn-test-vweb\vite.config.ts
error when starting dev server:
Error: Build failed with 1 error:
tsconfig.json:1:0: ERROR: Unexpected "\x88" in JSON
    at failureErrorWithLog (F:\code\qn-test-vweb\node_modules\esbuild\lib\main.js:1566:15)
    at F:\code\qn-test-vweb\node_modules\esbuild\lib\main.js:1024:28
    at runOnEndCallbacks (F:\code\qn-test-vweb\node_modules\esbuild\lib\main.js:1438:61)
    at buildResponseToResult (F:\code\qn-test-vweb\node_modules\esbuild\lib\main.js:1022:7)
    at F:\code\qn-test-vweb\node_modules\esbuild\lib\main.js:1134:14
    at responseCallbacks.<computed> (F:\code\qn-test-vweb\node_modules\esbuild\lib\main.js:671:9)
    at handleIncomingPacket (F:\code\qn-test-vweb\node_modules\esbuild\lib\main.js:726:9)
    at Socket.readFromStdout (F:\code\qn-test-vweb\node_modules\esbuild\lib\main.js:647:7)
    at Socket.emit (node:events:513:28)
    at addChunk (node:internal/streams/readable:315:12)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.


百度无果后尝试升级node、yarn、等还是无用,最后分析了文件字节码发现是公司电脑加密的原因。

在打包编译的时候由于加密无法进行编译,解决的话就得联系运维来帮忙处理了。

但如果通过yarn create vite 新建一个项目不会出现上述问题。

目录
相关文章
|
3天前
|
设计模式 JavaScript 前端开发
Vue3报错Property “xxx“ was accessed during render but is not defined on instance
Vue3报错Property “xxx“ was accessed during render but is not defined on instance
|
3天前
Vue3+Vite+Pinia+Naive后台管理系统搭建之五:Pinia 状态管理
Vue3+Vite+Pinia+Naive后台管理系统搭建之五:Pinia 状态管理
8 1
|
3天前
Vue3+Vite+Pinia+Naive后台管理系统搭建之三:vue-router 的安装和使用
Vue3+Vite+Pinia+Naive后台管理系统搭建之三:vue-router 的安装和使用
8 0
|
3天前
Vue3+Vite+Pinia+Naive后台管理系统搭建之二:scss 的安装和使用
Vue3+Vite+Pinia+Naive后台管理系统搭建之二:scss 的安装和使用
8 0
|
3天前
Vue3+Vite+Pinia+Naive后台管理系统搭建之一:基础项目构建
Vue3+Vite+Pinia+Naive后台管理系统搭建之一:基础项目构建
7 1
|
4天前
|
监控 JavaScript 前端开发
Vue 项目性能优化指南:提升应用速度与效率
Vue 项目性能优化指南:提升应用速度与效率
|
4天前
|
存储 缓存 JavaScript
如何从 Vue CLI 迁移到 Vite
如何从 Vue CLI 迁移到 Vite
|
4天前
|
JavaScript Go
VUE3+vite项目中动态引入组件和异步组件
VUE3+vite项目中动态引入组件和异步组件
|
6天前
|
Web App开发 编解码 JavaScript
【Vue篇】Vue 项目下载、介绍(详细版)
【Vue篇】Vue 项目下载、介绍(详细版)
10 3
|
6天前
|
JavaScript 前端开发 容器
Vue 3 中 <transition-group> 组件报错的非 props 属性传递问题
Vue 3 中 <transition-group> 组件报错的非 props 属性传递问题
24 1