https://codepen.io/anon/pen/wOxYjR
1) In nuxt.config.js set server: {socket: 'nuxt.js'} (according to docs)
2) npm run build
3) npm start
4) kill process (Ctrl+C)
5) npm start
Nuxt will connect to the existing .socket file or replace it with a new one
Second npm start will fail with Nuxt Fatal Error "Error: Address localhost:3000 is already in use." - the error message does not help much because the origin of the error is existing socket file, not the running instance
I could remove the socket as part of start script, however I do not find such a solution clean plus I believe that the error message should be more helpful
@OndraRehounek Thanks for the reporting 馃槃
I corrected the error message in https://github.com/nuxt/nuxt.js/commit/2eb196535701403d44973bbc252e441042466fca , but we couldn't simply remove the socket file since we don't know if is using by any other server, so a helpful message should be proper, hope you can understand 馃樃 .
@clarkdo that makes sense :) thanks for such a fast reply!
Hi,
We would really like cleanup of the unix socket file (and a method for chmod 777 as well if needed). Anything that can be done about it?
Referring to this: https://stackoverflow.com/questions/16178239/gracefully-shutdown-unix-socket-server-on-nodejs-running-under-forever
It should be possible in any case and we have other nodejs running where we never see issues when using the socket file :)
Most helpful comment
Hi,
We would really like cleanup of the unix socket file (and a method for chmod 777 as well if needed). Anything that can be done about it?
Referring to this: https://stackoverflow.com/questions/16178239/gracefully-shutdown-unix-socket-server-on-nodejs-running-under-forever
It should be possible in any case and we have other nodejs running where we never see issues when using the socket file :)