Hello,
I was troubleshooting a frappe version-14 installation where node-socketio wasn’t working. I checked discuss forum and the solutions didn’t help my case.
After some digging around, found one the issue.
- node-socketio wasn’t listening on port 9000
- npm dependencies were correctly installed for frappe app
- node and npm was installed using nvm in production user
- socketio config was getting added to nginx.conf
- no relevant errors in
frappe-bench/logs folder
- its config section was missing from supervisor.conf
-
bench setup socketio
didn’t help; Anyways it was deprecated.
While looking into source code of bench, found that a variable node
was being referred in template for supervisor.conf. This variable was derived by checking presence of node
. This wasn’t going work in the troubled installation because node wasn’t installed in root
user.
Solutions:
- run
bench setup supervisor
- this command is run without sudo and hence will be able to detect node installation correctly. - install node in root user and make sure that it gets added to path when a command is run as sudo. After that, run
sudo bench setup production frappe
edit:
- rectified from
bench setup supervisor
tobench setup socketio
in troubleshooting steps - mentioned frappe version
HTH!
Vamyip