Skip to content
Discussion options

You must be logged in to vote

Solution to Force Vite to Use esbuild@0.25.0

when update esbuild@0.24.0 to esbuild@0.25.0 The issue is that Vite is still using esbuild@0.24.0 internally, even though you've installed esbuild@0.25.0 globally. Since Vite defines esbuild@0.24.0 as a dependency, npm installs it inside node_modules

Update esbuild

npm install vite esbuild@latest 

Open package.json and delete this line inside dependencies if you had it

"esbuild": "^0.24.0"  or  "esbuild": "^0.25.0",

Now, add the override inside package.json:

"overrides": {
  "esbuild": "0.25.0"
},

Save the file and reinstall everything:

npm install

After updating, check that all instances of esbuild are using the correct version:

npm ls esbuild

Replies: 6 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@chipse
Comment options

@Rishi-Sudhakar
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@EvgeniiaZadorozhnaia
Comment options

@00mxhdi
Comment options

@ahmed-abd-alalim
Comment options

@Sayedabutahir
Comment options

Answer selected by tuves
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development
10 participants