citronneur / node-rdpjs

Remote Desktop Protocol for Node.js
GNU General Public License v3.0
887 stars 154 forks source link

TypeError: crypto.createCredentials is not a function #39

Closed hktalent closed 5 years ago

hktalent commented 5 years ago

@mscdex

$ npm i -g node-rdpjs
$ npm i  node-rdpjs
[node-rdpjs] ERROR: undefined(crypto.createCredentials is not a function)
TypeError: crypto.createCredentials is not a function
    at BufferLayer.startTLS (/Users/xxx/Downloads/mstsc.js/node_modules/node-rdpjs/lib/core/layer.js:127:39)
    at Client.recvConnectionConfirm (/Users/xxx/Downloads/mstsc.js/node_modules/node-rdpjs/lib/protocol/x224.js:245:28)
    at TPKT.<anonymous> (/Users/xxx/Downloads/mstsc.js/node_modules/node-rdpjs/lib/protocol/x224.js:202:8)
    at Object.onceWrapper (events.js:276:13)
    at TPKT.emit (events.js:188:13)
    at TPKT.recvData (/Users/xxx/Downloads/mstsc.js/node_modules/node-rdpjs/lib/protocol/tpkt.js:110:7)
    at BufferLayer.<anonymous> (/Users/xxx/Downloads/mstsc.js/node_modules/node-rdpjs/lib/protocol/tpkt.js:101:8)
    at Object.onceWrapper (events.js:276:13)
    at BufferLayer.emit (events.js:188:13)
    at BufferLayer.recv (/Users/xxx/Downloads/mstsc.js/node_modules/node-rdpjs/lib/core/layer.js:92:8)
sam-github commented 5 years ago

See: https://github.com/nodejs/node/issues/25552#issuecomment-455397485

chaserstrong commented 5 years ago

@sam-github So how to solve this problem? In my situation, the version of node > 10.8.0 is required.

sam-github commented 5 years ago

Update node-rdpjs to a version that includes this change?

https://github.com/citronneur/node-rdpjs/commit/9d4058d600aa3b6159fc5a1e2de20a0511d9c412

chaserstrong commented 5 years ago

@sam-github But have you published it on npm?

sam-github commented 5 years ago

@chaserstrong you misunderstand, I have nothing to do with this project, I work on node core. If you need node-rdpjs published, and it isn't, you'll need to ask its maintainers (or fork it).

chaserstrong commented 5 years ago

@sam-github I see. Thank you!