Radka
raw JSON → 0.5.1 verified Fri May 01 auth: no javascript maintenance
Radka (v0.5.1) is a Node.js-based static site generator that uses JSX without React. It transpiles JSX pages to static HTML, supporting dynamic routing inspired by Next.js (e.g., `pet/[type].page.jsx`). Under the hood, it bundles Babel, PayPal's JSX Pragmatic, Turbolinks, and Parcel. Unlike Gatsby or Next.js, Radka avoids React's client-side state management, relying on vanilla CSS and JavaScript. It uses file-based routing in `src/pages/` and outputs to a `site/` folder. The project appears to be experimental with low release cadence (last update likely in 2019).
Common errors
error Error: Cannot find module '@babel/core' ↓
cause Missing Babel dependency automatically installed by Radka.
fix
Run 'npm install' in the project root to install all dependencies.
error Uncaught ReferenceError: jsx is not defined ↓
cause Forgetting to import { jsx } from 'radka' in JSX file.
fix
Add 'import { jsx } from 'radka';' at the top of the file.
error Error: Export 'page' (imported as 'page') was not found in 'radka' ↓
cause Incorrect import syntax (e.g., default import instead of named).
fix
Use 'import { page } from 'radka';' (named import).
Warnings
deprecated Radka relies on outdated dependencies (Babel 6, Parcel 1, Turbolinks) which may have security issues. ↓
fix Consider using modern SSG alternatives like Eleventy or Astro.
gotcha Import paths for scripts must omit file extension (e.g., './index.script' not './index.script.js'). ↓
fix Use './index.script' for .js files.
gotcha Dynamic route parameters are defined in the filename (e.g., '[type].page.jsx') and passed as props. ↓
fix Ensure filenames use brackets for dynamic segments.
gotcha The 'Import' tag is capital-sensitive; using 'import' (lowercase) will fail silently. ↓
fix Always use <Import /> with capital I.
Install
npm install radka yarn add radka pnpm add radka Imports
- jsx wrong
import React from 'react'; import { jsx } from 'radka'correctimport { jsx } from 'radka' - page wrong
import page from 'radka'correctimport { page } from 'radka' - Import wrong
import Import from 'radka'correctimport { Import } from 'radka'
Quickstart
mkdir radka-site && cd radka-site
npm init -y
npm install radka --save-dev
mkdir -p src/pages
cat > src/pages/index.page.jsx << 'EOF'
import { jsx, page } from 'radka';
function Main() {
return (
<div>
<h1>Main page</h1>
<p>Welcome to Radka!</p>
</div>
);
}
export default page(Main);
EOF
npx radka
npx radka server