1. Login to server through SSH using root user.
2. The data directory of the Node.js application at plesk is /opt/plesk/node/<Node.js version>/* directory. By-default three binary version of Node.js (version: 6, 8 and 9) will be install at Plesk.
3. Now go to the any version of the Node.js binary directory and we can find the component's version through below as given commands:
# cd /opt/plesk/node/<Node.js version>/bin (Example: /opt/plesk/node/9/bin)
# ./node -v
# ./npm -v
1. Now go to the any version of the nodejs binary directory.
# cd /opt/plesk/node/9/bin
2. Then run the below command to install the websocket.
# ./npm install websocket
3. After installation you can check the websocket modules inside the node_modules directory.
Location: /opt/plesk/node/9/bin/node_modules/websocket/