So I was upgrading a few scenes in a demo project and I used the Export Info context menu > Update Vite Config for them all, all worked except this one and it even repros in a bug report project. I’m stumped as to what is causing this as the Vite config of the original was just the basic one untouched and it is a simple project.
On run of local server I get the error: TypeError: server.ws.on is not a function
Project attached
Full error:
> my-project@1.0.0 start
> vite --host
error when starting dev server:
TypeError: server.ws.on is not a function
at Object.configureServer (file:///C:/Unity_Projects/NeedleWebDemos/Library/PackageCache/com.needle.engine@2.58.4-pre/package~/plugins/vite/poster.js:19:23)
at createServer (C:\Unity_Projects\NeedleWebDemos\Needle\####projectname\node_modules\vite\dist\node\chunks\dep-3e244802.js:66749:41)
at async CAC.<anonymous> (C:\Unity_Projects\NeedleWebDemos\Needle\####projectname\node_modules\vite\dist\node\cli.js:687:24)
If the Vite config updater removes lots of my stuff and resets the vite config already, can it automatically set the correct Vite version to avoid this?
That’s alright, at least I know what caused this, when does that vite package get updated in the package.json by Needle as this was just one scene out of 10 that randomly had an old vite there