You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quando tento rodar o código do index.js, recebo o seguinte erro Unhandled rejection (<{"state":"failed","reason":{"code":13,...>, no stack trace).
Utilizei o comando node index.js para executar o arquivo pelo terminal.
index.js
let BlipSdk = require('blip-sdk');
let WebSocketTransport = require('lime-transport-websocket');
// Put your identifier and access key here
let IDENTIFIER = 'example';
let ACCESS_KEY = 'example';
// Create a client instance passing the identifier and accessKey of your chatbot
let client = new BlipSdk.ClientBuilder()
.withIdentifier(IDENTIFIER)
.withAccessKey(ACCESS_KEY)
//Erro no arrow function
.withTransportFactory(() => new WebSocketTransport())
.withTransportFactory(function() { return (new WebSocketTransport())})
.build();
// Connect with server asynchronously
// Connection will occurr via websocket on 8081 port.
client.connect() // This method return a 'promise'.
.then(function(session) {
// Connection success. Now is possible send and receive envelopes from server. */
console.log('Application started. Press Ctrl + c to stop.')
})
.catch(function(err) { /* Connection failed. */ });
The text was updated successfully, but these errors were encountered:
Quando tento rodar o código do index.js, recebo o seguinte erro Unhandled rejection (<{"state":"failed","reason":{"code":13,...>, no stack trace).
Utilizei o comando
node index.js
para executar o arquivo pelo terminal.index.js
The text was updated successfully, but these errors were encountered: