Registry / aws / rajt
library0.0.106jsnpmunverified

Rajt (v0.0.106, pre-1.0) is a TypeScript-native, fully typed serverless framework (not a runtime) that acts as a bundler layer for AWS Lambda (Node.js ≥18, LLRT) and Cloudflare Workers. It provides a router, middleware, and type-safe request/response handling with zero external runtime dependencies. Its key differentiators: single interface across Lambda and Workers, tree-shakable bundler integration, and strict typing that catches misconfigurations at compile time. Active development with frequent releases; not stable yet. Consider alternatives like @aws-lambda-powertools, Hono, or Itty Router for production.

npm install rajt
INSTALL
IMPORT
SIG · RAJT
R
rajt
awsjavascriptv0.0.106
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

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

Rajt
✓ import { Rajt } from 'rajt'
✗ const Rajt = require('rajt')
Rajt is ESM-only; CJS require() throws. Named export, not default.
Router
✓ import { Router } from 'rajt'
✗ import Router from 'rajt'
Router is a named export, not default. Common mistake due to other frameworks.
defineConfig
✓ import { defineConfig } from 'rajt'
✗ import { defineConfig } from 'rajt/config'
Subpath exports not defined; 'rajt' only.

Creates a basic HTTP server using Rajt's router and exports the handler for AWS Lambda or Cloudflare Workers.

import { Rajt, Router } from 'rajt'; const router = new Router(); router.get('/hello', async (req) => { return new Response('Hello, World!'); }); const app = new Rajt(); app.use(router); export const handler = app.handle;
Debug
Known issues
breakingRajt v0.0.106 is pre-1.0 with frequent breaking changes. API surface may change without major version bump.
fix
Lock version and watch changelog. Do not use for production-critical applications.
affects: <1.0.0
gotchaThe Router instance does not support middleware attached directly to it; must use Rajt instance's use() method.
fix
Call app.use(router) instead of router.use(middleware).
affects: >=0.0.0
gotchaEnvironment-specific features (e.g., AWS Lambda context) require explicit types from 'rajt/types/aws' or 'rajt/types/cloudflare'.
fix
Import types: import { LambdaContext } from 'rajt/types/aws';
affects: >=0.0.0
breakingLLRT support is experimental and may not cover full Lambda API.
fix
Test thoroughly on LLRT; file issues if missing features.
affects: >=0.0.0
gotchaResponse objects must follow Web API Response interface; do not use AWS Lambda-style callbacks.
fix
Return a standard Response object, e.g., new Response(body, { status: 200 }).
affects: >=0.0.0
Errors
Common errors & fixes
Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'rajt' imported from ...
ESM-only package; using require() or misconfigured bundler/Node.js ES modules.
fix
Ensure package.json has 'type': 'module' and use import syntax. Node.js >=18 required.
TypeError: (intermediate value).use is not a function
Calling router.use() instead of app.use(router).
fix
Use app.use(router) on the Rajt instance.
TS2339: Property 'requestContext' does not exist on type 'Request'
Accessing Lambda-specific properties without type augmentation.
fix
Import and use types from 'rajt/types/aws' as type assertion.
SyntaxError: Unexpected identifier 'Rajt'
Importing rajt using CJS require() or in a CJS context.
fix
Switch to ESM syntax: import { Rajt } from 'rajt'.
Upgrade
Version history
0.0.106latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
18 hits · last 30 days
node
15
Amazon
1
Resources
rajt — npm install rajt · libregistry