Registry / database / arkormx

arkormx

JSON →
library2.4.2jsnpmunverified

Arkormˣ (v2.4.2) is a modern TypeScript-first ORM for Node.js with an adapter-based architecture. It provides a familiar model layer, fluent query builder, and transaction support, framework-agnostic and runtime-agnostic. Key differentiators: optional Prisma 2.x compatibility path (allows using existing Prisma schema and client), Kysely adapter for raw SQL, and an intuitive Eloquent-like API. Stable release cadence (minor updates every few weeks). Requires Node >=20.0.0 and relies on 'kysely' and 'pg' for database connectivity.

npm install arkormx
INSTALL
IMPORT
SIG · ARKORMX
A
arkormx
databasejavascriptv2.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Model
import { Model } from 'arkormx'
const { Model } = require('arkormx')
ESM-only; no CommonJS support.
createKyselyAdapter
import { createKyselyAdapter } from 'arkormx'
import { createKyselyAdapter } from 'arkormx/adapter'
Direct export, not a subpath.
defineConfig
import { defineConfig } from 'arkormx'
import { defineConfig } from 'arkormx/config'
Part of main module since v2.
type UserAttributes
import type { UserAttributes } from 'arkormx'
import { UserAttributes } from 'arkormx'
Type-only import; avoid runtime import.

Shows basic setup with Kysely adapter, model definition, and a query filtering by active users.

import { Model, createKyselyAdapter, defineConfig } from 'arkormx'; import { Kysely, PostgresDialect } from 'kysely'; import { Pool } from 'pg'; const pool = new Pool({ connectionString: process.env.DATABASE_URL ?? '' }); const db = new Kysely<any>({ dialect: new PostgresDialect({ pool }) }); export default defineConfig({ adapter: createKyselyAdapter(db) }); type UserAttrs = { id: number; name: string; email: string; isActive: boolean }; export class User extends Model<UserAttrs> {} async function main() { const activeUsers = await User.query() .whereKey('isActive', true) .latest() .limit(10) .get(); console.log(activeUsers); } main();
Debug
Known issues
breakingMinimum Node.js version is 20.0.0. Older versions are not supported.
fix
Upgrade Node.js to v20+.
affects: >=2.0.0
deprecatedPrisma compatibility path (using `prisma: () => prisma` in config) is optional and may be removed in future major versions.
fix
Migrate to native Kysely adapter for all queries.
affects: >=2.0.0 <3.0.0
gotchaThe `User.query().create()` method expects attributes as object; using `insert()` from Kysely directly is not supported.
fix
Use `.create()` for single record insertion.
affects: >=2.0.0
breakingArkormˣ is ESM-only; CommonJS require() will fail unless using dynamic import.
fix
Use `import` syntax in your project, or set `"type": "module"` in package.json.
affects: >=2.0.0
gotchaThe `defineConfig` function must be exported as default from `arkormx.config.js` for CLI to work.
fix
Use `export default defineConfig({...})`.
affects: >=2.0.0
Errors
Common errors & fixes
Error: Cannot find module 'arkormx'
Package not installed or missing dependencies (kysely, pg).
fix
Run `pnpm add arkormx kysely pg`.
TypeError: Class extends value undefined is not a constructor or null
Model import resolved to undefined (e.g., due to circular dependency or wrong import path).
fix
Ensure you use `import { Model } from 'arkormx'` and not a relative path.
Error [ERR_REQUIRE_ESM]: require() of ES Module
Using CommonJS require() to import arkormx.
fix
Change to `import` syntax or use dynamic `import('arkormx')`.
error TS2307: Cannot find module 'kysely' or its corresponding type declarations.
Missing TypeScript declaration files for kysely.
fix
Install kysely with `pnpm add -D @types/kysely` (or ensure tsconfig includes node_modules types).
Upgrade
Version history
2.4.2latest on npm
Audit
Dependencies
kyselyrequiredRuntime adapter for query building and execution
pgoptionalPostgreSQL client for database connection
Agent activity
19 hits · last 30 days
node
14
OpenAI (training)
1
Resources
arkormx — npm install arkormx · libregistry