loftyshaky / clear-new-tab

MIT License
14 stars 2 forks source link

Error: No process running on port #14

Open elintendo opened 2 months ago

elintendo commented 2 months ago

Hi! I have troubles running your code. npm run dev shows the following error:

...st{stdout:stdout}=res;if(!stdout)return res;const lines=stdout.split("\n"),lineWithLocalPortRegEx=new RegExp(`^ *${method.toUpperCase()} *[^ ]*:${port}`,"gm"),pids=lines.filter((line=>line.match(lineWithLocalPortRegEx))).reduce(((acc,line)=>{const match=line.match(/(\d*)\w*(\n|$)/gm);return match&&match[0]&&!acc.includes(match[0])?acc.concat(match[0]):acc}),[]);return sh(`TaskKill /F /PID ${pids.join(" /PID ")}`)})):sh("lsof -i -P").then((res=>{const{stdout:stdout}=res;return stdout?stdout.split("\n").filter((line=>line.match(new RegExp(`:*${port}`)))).length>0?sh(`lsof -i ${"udp"===method?"udp":"tcp"}:${port} | grep ${"udp"===method?"UDP":"LISTEN"} | awk '{print $2}' | xargs kill -9`):Promise.reject(new Error("No process running on port")):res})):Promise.reject(new Error("Invalid port number provided"))}(this.port,"tcp").then((()=>{this.httpserver.listen(this.port).on("error",(error=>{console.log(redBright(`[Advanced Extension Reloader Watch 2 error] Unable ttransport.writable&&(debug$6("writing a noop pa
o connect to port ${this.port}.`)),console.log(error),process.exit(1)}))}))}}}));

Error: No process running on port
    at /home/me/clear-new-tab/node_modules/advanced-extension-reloader-watch-2/umd/reloader.js:9:609612

Node.js v20.12.2

Port 7221 is free.

loftyshaky commented 2 months ago

I've made some changes to advanced-extension-reloader-watch-2 and clear-new tab. Please reclone the clear-new-tab repo and try again.

elintendo commented 2 months ago

Now it compiles without errors. But still I cannot access localhost:7221

loftyshaky commented 2 months ago

Could you explain what are you trying to achieve?