Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 运行打包 出现报错 vite.createFilter is not a function #1172

Open
bypanghu opened this issue Jul 15, 2022 · 1 comment
Open
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@bypanghu
Copy link
Member

bypanghu commented Jul 15, 2022

gin-vue-admin 版本

所有gva版本

Node 版本

所有gva版本

Golang 版本

所有gva版本

是否依旧存在

可以

bug描述

如果使用yarn 安装,不会在安装的时候报错,它只会在运行的时候报错 vite.createFilter is not a function
如果使用npm 安装,则会出现 vitejs/plugin-vue vite 版本不一致。

image

其原因是因为7月12号左右 vite 官方发版本,导致 vitevitejs/plugin-vue 升级了一个大版本。但是Gva 的前端package.json 包里面的vitejs/plugin-vue 使用的是 lastest ,但是vite 限制了大版本。导致出现了版本不匹配。

解决方法是: 将web目录下的vitejs/plugin-vue 后面的 lastest 改成^2.3.3

修改建议

将web目录下的vitejs/plugin-vue 后面的 lastest 改成^2.3.3

@bypanghu bypanghu added the bug Something isn't working label Jul 15, 2022
@re-saika
Copy link

同出了这个问题,折腾了好久踩了好多坑。一开始是改了vite版本,然后打包成功了,但是访问会报一个什么URL的错 。最后跟着这个修改建议改了@vitejs/plugin-vue的版本,终于打包成功了,点赞!

@songzhibin97 songzhibin97 removed their assignment Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants
@SliverHorn @songzhibin97 @bypanghu @re-saika and others