try to connect with websocket inside a serverless framework lambda with nodejs.16x as runtime
error: TypeError: node_js_1.default is not a constructor
at SurrealSocket.open (/var/task/node_modules/surrealdb.js/script/library/SurrealSocket.js:92:20)
i found a issue similar to this, but i dont have the dependencies which apparently was generating the error. Before i was using the SurrealDB.js with version 0.5.0 and it was working fine
Steps to reproduce
import { Surreal } from 'surrealdb.js';
const db = new Surreal();
// this line throws an error
await surrealDb.connect(process.env.SURREAL_URL, {
auth: {
username: process.env.SURREAL_USERNAME,
password: process.env.SURREAL_PASSWORD,
},
namespace: process.env.SURREAL_NAMESPACE,
database: process.env.SURREAL_DBNAME,
});
Expected behaviour
The connection should initialize and not throw an error
SurrealDB version
v1.2.1
SurrealDB.js version
0.11.0
Contact Details
tharris@cloudcar.cl
Is there an existing issue for this?
[X] I have searched the existing issues
Code of Conduct
[X] I agree to follow this project's Code of Conduct
Describe the bug
try to connect with websocket inside a serverless framework lambda with nodejs.16x as runtime
i found a issue similar to this, but i dont have the dependencies which apparently was generating the error. Before i was using the SurrealDB.js with version 0.5.0 and it was working fine
Steps to reproduce
Expected behaviour
The connection should initialize and not throw an error
SurrealDB version
v1.2.1
SurrealDB.js version
0.11.0
Contact Details
tharris@cloudcar.cl
Is there an existing issue for this?
Code of Conduct