Registry / web-framework / exact
library2.2.1jsnpmunverified

exact is a universal React framework for building web applications with support for both server-side rendering (SSR) and static site generation (SSG). The current stable version is 1.0.1 (August 2024), with monthly releases. It differentiates itself from Next.js by offering a minimal, framework-agnostic approach with zero configuration, automatic code splitting, and built-in TypeScript support. The package was originally a different utility (v0.x) but was renamed for the React framework. It is designed for modern React development with ESM and CommonJS support.

npm install exact
INSTALL
IMPORT
SIG · EXACT
E
exact
web-frameworkjavascriptv2.2.1
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
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 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

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

default
import exact from 'exact'
const exact = require('exact')
Default import is the main entry point. CommonJS require works but ESM is preferred since v1.0.
render
import { render } from 'exact'
import render from 'exact'
Named export for server-side rendering. Not a default export.
StaticRouter
import { StaticRouter } from 'exact'
Used for static site generation. TypeScript types are included.

Creates a basic server that renders a React component to string using exact.createServer.

import exact from 'exact'; import React from 'react'; const App = () => <h1>Hello, Exact!</h1>; const server = exact.createServer({ port: 3000 }); server.renderToString(<App />).then(html => { console.log(html); });
Debug
Known issues
breakingThe package was renamed from v0.x (a different utility) to v1.0 (React framework). All APIs changed.
fix
Update to v1.0 and rewrite code using the new React framework APIs.
affects: >=1.0.0
deprecatedCommonJS require() may be deprecated in future versions. Use ESM imports.
fix
Use import instead of require.
affects: >=1.0.0
gotchaAutomatic code splitting requires dynamic import() syntax. Static imports will bundle all code.
fix
Use dynamic import() for route-based code splitting.
affects: >=1.0.0
gotchaServer-side rendering requires Node.js 14 or higher.
fix
Upgrade Node.js to version 14+ or use static export.
affects: >=1.0.0
Errors
Common errors & fixes
Module not found: Can't resolve 'exact'
Package not installed or version <1.0.0 (old package).
fix
Run 'npm install exact@1.0.1' and ensure import path is correct.
TypeError: exact.createServer is not a function
Using default import but the function is not exported as default.
fix
Use named import: import { createServer } from 'exact'.
SyntaxError: Cannot use import statement outside a module
Running ESM code in a CommonJS module.
fix
Add 'type': 'module' in package.json or use .mjs extension.
Upgrade
Version history
2.2.1latest on npm
Audit
Dependencies
reactrequiredPeer dependency required for rendering React components.
react-domrequiredPeer dependency required for rendering React components in the browser.
Agent activity
2 hits · last 30 days
node
2
Resources
exact — npm install exact · libregistry