{"id":18702,"library":"rajt","title":"Rajt – Serverless Bundler Layer for AWS Lambda & Cloudflare Workers","description":"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.","status":"active","version":"0.0.106","language":"javascript","source_language":"en","source_url":"git://github.com/attla/rajt","tags":["javascript","rajt","aws","lambda","llrt","app","http","application","framework"],"install":[{"cmd":"npm install rajt","lang":"bash","label":"npm"},{"cmd":"yarn add rajt","lang":"bash","label":"yarn"},{"cmd":"pnpm add rajt","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Rajt is ESM-only; CJS require() throws. Named export, not default.","wrong":"const Rajt = require('rajt')","symbol":"Rajt","correct":"import { Rajt } from 'rajt'"},{"note":"Router is a named export, not default. Common mistake due to other frameworks.","wrong":"import Router from 'rajt'","symbol":"Router","correct":"import { Router } from 'rajt'"},{"note":"Subpath exports not defined; 'rajt' only.","wrong":"import { defineConfig } from 'rajt/config'","symbol":"defineConfig","correct":"import { defineConfig } from 'rajt'"}],"quickstart":{"code":"import { Rajt, Router } from 'rajt';\n\nconst router = new Router();\nrouter.get('/hello', async (req) => {\n  return new Response('Hello, World!');\n});\n\nconst app = new Rajt();\napp.use(router);\n\nexport const handler = app.handle;\n","lang":"typescript","description":"Creates a basic HTTP server using Rajt's router and exports the handler for AWS Lambda or Cloudflare Workers."},"warnings":[{"fix":"Lock version and watch changelog. Do not use for production-critical applications.","message":"Rajt v0.0.106 is pre-1.0 with frequent breaking changes. API surface may change without major version bump.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Call app.use(router) instead of router.use(middleware).","message":"The Router instance does not support middleware attached directly to it; must use Rajt instance's use() method.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Import types: import { LambdaContext } from 'rajt/types/aws';","message":"Environment-specific features (e.g., AWS Lambda context) require explicit types from 'rajt/types/aws' or 'rajt/types/cloudflare'.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Test thoroughly on LLRT; file issues if missing features.","message":"LLRT support is experimental and may not cover full Lambda API.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Return a standard Response object, e.g., new Response(body, { status: 200 }).","message":"Response objects must follow Web API Response interface; do not use AWS Lambda-style callbacks.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'-1.0':13 '18':36 'across':62 'act':27 'activ':80 'altern':89 'app':106 'applic':108 'aw':6,33,92,103 'aws-lambda-powertool':91 'bundler':3,30,69 'catch':75 'cloudflar':8,39 'compil':78 'consid':88 'depend':56 'develop':81 'differenti':59 'extern':54 'framework':22,109 'frequent':83 'fulli':19 'handl':51 'hono':95 'http':107 'integr':70 'interfac':61 'itti':97 'javascript':101 'key':58 'lambda':7,34,63,93,104 'layer':4,31 'like':90 'llrt':37,105 'middlewar':45 'misconfigur':76 'nativ':18 'node.js':35 'powertool':94 'pre':12 'product':100 'provid':42 'rajt':1,10,102 'releas':84 'request/response':50 'router':44,98 'runtim':25,55 'safe':49 'serverless':2,21 'shakabl':68 'singl':60 'stabl':86 'strict':72 'time':79 'tree':67 'tree-shak':66 'type':20,48,73 'type-saf':47 'typescript':17 'typescript-n':16 'v0.0.106':11 'worker':9,40,65 'yet':87 'zero':53","created_at":"2026-04-25T07:39:40.901940+00:00","updated_at":"2026-04-25T07:39:40.901940+00:00","problems":[{"fix":"Ensure package.json has 'type': 'module' and use import syntax. Node.js >=18 required.","cause":"ESM-only package; using require() or misconfigured bundler/Node.js ES modules.","error":"Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'rajt' imported from ..."},{"fix":"Use app.use(router) on the Rajt instance.","cause":"Calling router.use() instead of app.use(router).","error":"TypeError: (intermediate value).use is not a function"},{"fix":"Import and use types from 'rajt/types/aws' as type assertion.","cause":"Accessing Lambda-specific properties without type augmentation.","error":"TS2339: Property 'requestContext' does not exist on type 'Request'"},{"fix":"Switch to ESM syntax: import { Rajt } from 'rajt'.","cause":"Importing rajt using CJS require() or in a CJS context.","error":"SyntaxError: Unexpected identifier 'Rajt'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":"https://zunq.dev","github":"https://github.com/attla/rajt","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/rajt","openapi_spec":null,"status_page":null,"smithery":null,"categories":["aws","web-framework","devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}