Frappe version ( v14.16.0)
I faced error when restarting bench. when I debug the socket.io error log file its show syntax error
/frappe-bench/apps/frappe/socketio.js:306
args?.callback(err, res);
then I removed ternary ? operator it will work fine.
The minimum required node version is node14 since v13.
You seem to be using old version of node which doesn’t have support for optional chaining. You should upgrade node instead of editing code cause many other things are potentially silently breaking.