Closed cifumo closed 1 month ago
Have you tried like as example usage? and what Node JS Version you have? or are you using Bun JS or Deno?
Have you tried like as example usage? and what Node JS Version you have? or are you using Bun JS or Deno?
im use nodejs v 18
Have you tried like the Example Usage?
(async function() {
const client = new (await import("cainode")).CAINode();
await client.login("Your token");
console.log("Logged in!");
await client.logout();
})()
is it solved?
/home/jelastic/ROOT/node_modules/cainode/index.js:1 import WebSocket from "ws"; ^^^^^^
SyntaxError: Cannot use import statement outside a module at internalCompileFunction (node:internal/vm:76:18) at wrapSafe (node:internal/modules/cjs/loader:1283:20) at Module._compile (node:internal/modules/cjs/loader:1328:27) at Module._extensions..js (node:internal/modules/cjs/loader:1422:10) at Module.load (node:internal/modules/cjs/loader:1203:32) at Module._load (node:internal/modules/cjs/loader:1019:12) at ModuleWrap. (node:internal/modules/esm/translators:203:29)
at ModuleJob.run (node:internal/modules/esm/module_job:195:25)
at async ModuleLoader.import (node:internal/modules/esm/loader:337:24)
at async Object.eval (eval at handler (file:///home/jelastic/ROOT/plugins/owner-exec.js?update=1727069046115:26:16), :3:12)