Vocs

raw JSON →
1.4.1 verified Mon Apr 27 auth: no javascript

Minimal documentation framework for React projects, powered by Vite. Version 1.4.1 is the latest stable release, with a current release cadence of minor updates every few months. It differentiates from alternatives like Docusaurus or Storybook by being extremely lightweight, offering zero-config setup, and focusing on single-page documentation sites with MDX support. Built on Vite for fast HMR and optimized builds. Ships TypeScript types. Requires React 19 and React DOM 19 as peer dependencies, and Node >=22. Actively maintained by Wevm.

error Error: Cannot find module 'vocs'
cause Vocs is not installed or using CJS require instead of ESM import.
fix
Run 'npm install vocs' and ensure your project uses ES modules. Use 'import vocs from 'vocs'' instead of require.
error Error: React 19 is required. Current version: 18.x
cause Vocs requires React 19 as a peer dependency.
fix
Upgrade React and React DOM to version 19: 'npm install react@19 react-dom@19'
error Error: Unsupported Node.js version. Vocs requires Node >=22
cause Node.js version is too old.
fix
Install Node.js 22 or later using nvm or your package manager.
breaking Peer dependency React 19 and React DOM 19 are required. Projects using React 18 will not work.
fix Upgrade to React 19 or use an older version of Vocs (if available).
gotcha Vocs is ESM-only. It does not provide a CommonJS build. Do not use require() to import.
fix Ensure your project uses ES modules (e.g., type: 'module' in package.json, or use .mjs extension).
gotcha Node.js >=22 is required. Older Node versions will cause errors.
fix Update Node.js to version 22 or later.
deprecated The create-vocs scaffolding tool is the only recommended way to start a project. Manual setup may be unstable.
fix Use 'npx create-vocs@latest' to initialize a project.
npm install vocs
yarn add vocs
pnpm add vocs

Shows how to scaffold a new Vocs documentation site using create-vocs, then start development, build, and preview.

// Initialize a project (requires Node >=22)
npx create-vocs@latest my-docs
cd my-docs

// Install dependencies
npm install

// Start development server
npm run dev

// Build for production
npm run build

// Preview production build
npm run preview