I'm working with Tauri, using React and Vite for the front end. Everything was going well, but recently after changing some things around in this monorepo vite runs into a bug where it attempts to build, somehow launches another instance of itself somewhere, I think, and then fails because the port is already in use.
Maybe I'm reading too much into this, but it keeps colliding with it's own port, and if I set the server.strictPort field to false, it just goes 1420, 1421, 1422, 1423... and fails on every port.
I am absolutely positive I have nothing running on these ports before trying to build this app, and everything was great until I made some modifications to the monorepo itself, like integrating eslint and moving some common ui components to a separate package.
I had a bad habit of using next for more than I should have, but I'm not completely new at setting up a typescript library but for the life of me I can't figure this out.
I know this is a vite issue as the build fails with the same output, regardless of whether it's run as part of tauri or by call vite directly.
This is the output with the strictPort value set to true, which it needs to be for tauri to work, but if I set that to false this just prints continually in a loop of sequential ports.
error when starting dev server:
Error: Port 1420 is already in use
at Server.onError (file:///Users/bigsexy/Desktop/fluster/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected][email protected][email protected][email protected]/node_modules/vite/dist/node/chunks/dep-DBxKXgDP.js:25023:18)
at Server.emit (node:events:507:28)
at emitErrorNT (node:net:1973:8)
at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
ELIFECYCLE Command failed with exit code 1.
Error The "beforeDevCommand" terminated with a non-zero status code.
Any help is greatly appreciated.