Closed jouni-kantola closed 8 months ago
I tested the tcp-port-used
npm module that is used for checking the devUrl by starting Vite manually on port 4000 and then running the following script:
const tcpPortUsed = require("tcp-port-used");
tcpPortUsed.check(4000, "127.0.0.1").then(
function (inUse) {
console.log("Port 4000 usage:", inUse);
},
function (err) {
console.error("Error on check:", err.message);
}
);
The result is that tcp-port-used
reports the port being unused.
Port 4000 usage: false
I found a workaround. If I start Vite with vite --host
the waitUntilUsed
reports the correct port state.
Working frontendLibrary
config:
"frontendLibrary": {
"patchFile": "/resources/index.html",
"devUrl": "http://localhost:3000",
"projectPath": "/",
"devCommand": "vite --host",
"buildCommand": "vue-tsc --noEmit && vite build"
}
I'll close this issue as there is now a described workaround by using vite --host
.
Hey @jouni-kantola thanks for posting the solution for this issue :)
neu CLI doesn't detect that Vite is up and running on Windows 11. It works fine on MacOS (version 11).
This is the log that is displayed:
This is the neutralino.config.js I use to start Vite:
Output from
npx @neutralinojs/neu version
:Is this a bug or are there any Vite setups to compare with that works on both MacOS and Windows?