I'm getting this error when trying to use the Steam API:
var cryptedSessKey = require('crypto').publicEncrypt(fs.readFileSync(__dirna
^
TypeError: Object # has no method 'publicEncrypt'
at SteamClient.handlers.(anonymous function) (/usr/local/psa/var/modules/jxcore-support/native_modules/node_modules/steam/lib/steam_client.js:150:42)
at SteamClient.netMsgReceived (/usr/local/psa/var/modules/jxcore-support/native_modules/node_modules/steam/lib/steam_client.js:106:26)
at Connection.emit (events.js:82:15)
at Connection._readPacket (/usr/local/psa/var/modules/jxcore-support/native_modules/node_modules/steam/lib/connection.js:50:8)
at Connection.emit (events.js:79:15)
at emitReadable (_stream_readable.js:383:10)
at emitReadable (_stream_readable.js:379:5)
at readableAddChunk (_stream_readable.js:143:31)
at Connection.Readable.push (_stream_readable.js:107:10)
at TCP.onread (net.js:489:18)
Spawner error: Application exited by itself with code: 8
Spawner info: Subscribing is delayed by 2000 ms.
Spawner info: Subscribed successfully: Successfully subscribed process 25525 to the monitor.
The fix is to apparently upgrade my node.js to version v0.12. As stated here: https://github.com/seishun/node-steam/issues/121
How can I do this? I'm using JXCore extension for Plesk.
I've tried SSHing in and running update commands but it doesn't seem to recognise node. Do I have to browse to a certain directory? I can't even run node --version
because it's all within JXCore (I assume).
I have the lastest version of JXCore (Installed v Beta-0.3.0.2).
I'm assuming I'm just being an idiot somehow but I'm still new to node.js.
Can anyone help me?
Thank you
Jack
I asked the same question on their Github and this was their response:
JXcore v 0.3 is based on Node 0.10. AFAIK that module has node 0.10 compatible version too. You should use that. We are planning to bring new crypto API from 0.12 soon.
Therefore, for now, you can't update it.