StarlaneStudios / cirql

🔧 A flexible SurrealDB ORM & query builder with Zod powered validation 🏋️‍♂️
https://cirql.starlane.studio/
MIT License
202 stars 6 forks source link

Attempting to setup with a connection to SurrealDB. TypeError: Vt is not a constructor. #16

Open VerveLight opened 5 hours ago

VerveLight commented 5 hours ago

Describe the bug Attempting to connect to surrealDB, hosted on a headless machine on a simple local network. Surrealist connects fine, but i did have to download the latest version, as the old version wasn't able to connect.

Example

(base) PS C:\dev\vervelight\auguron> npm run dev

> auguron-augur-object-network@1.0.0 dev
> tsx src/index.ts

file:///C:/dev/vervelight/auguron/node_modules/cirql/dist/cirql.js:2313
    const n = new Vt(this.url);
              ^

TypeError: Vt is not a constructor
    at Qe.open (file:///C:/dev/vervelight/auguron/node_modules/cirql/dist/cirql.js:2313:15)
    at ze.connect (file:///C:/dev/vervelight/auguron/node_modules/cirql/dist/cirql.js:2453:27)
    at <anonymous> (C:\dev\vervelight\auguron\src\augurdb\connection\cursor.ts:5:20)
    at ModuleJob.run (node:internal/modules/esm/module_job:234:25)
    at async ModuleLoader.import (node:internal/modules/esm/loader:473:24)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:123:5)

Node.js v20.17.0

Expected behavior A clear and concise description of what you expected to happen.

Environment:

auguron-augur-object-network@1.0.0 C:\dev\vervelight\auguron ├── @types/express@4.17.21 ├── cirql@1.0.1 ├── express@4.21.0 ├── surrealdb@1.0.0 ├── tsx@4.19.1 ├── typescript@5.6.2 └── zod@3.23.8

VerveLight commented 5 hours ago

This is my connection, i've tried with both a host name, and IP addresss. And both with http and https.

Built with this as reference: https://cirql.starlane.studio/docs/guide/install

import { Cirql } from 'cirql';

const cirql = new Cirql();

await cirql.handle.connect('http://192.168.100.112:8888/');
await cirql.handle.signin({
    namespace: 'auguron',
    database: 'augurdb',
    username: '{censored username}',
    password: '{censored password}',
});

export { cirql };