# Is vuepress ESM-only? Can you require() it?

> vuepress@1.9.10 is a CommonJS package. CommonJS — require() works on every Node.js version we test.

Minimalistic doc generator with Vue component based layout system

Latest version 1.9.10, published Aug 14, 2023.

vuepress ships CommonJS only. require("vuepress") should work on every Node.js version the package supports (>=8.6); the runtime probe has not run for this version. import "vuepress" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

## What to do

1. require("vuepress") should work on every Node.js version the package supports (>=8.6); the runtime probe has not run for this version.
2. From ES modules use the default import: import vuepress from "vuepress"; then destructure. Named imports only work when Node.js can statically detect the exports.
3. TypeScript: no types are available for vuepress; declare the module yourself if you need them.

## Facts

- Latest: 1.9.10 (Aug 14, 2023)
- Module format: CommonJS
- Last CommonJS version: 1.9.10
- TypeScript types: none
- Node engines: >=8.6
- Weekly downloads: 64K
- License: MIT

## Runtime test results for vuepress@1.9.10

Runtime probe pending for this version (install failed: PROBE_TIMEOUT). The facts above come from package.json.

## How to import vuepress

ES modules:

```js
import vuepress from "vuepress";
```

CommonJS:

```js
const vuepress = require("vuepress");
```

## Module format by version

Derived from the type, main and exports fields of every stable release on npm (77 versions; the newest 60 shown).

| Versions | Format | First published |
|---|---|---|
| 0.8.0 – 1.9.10 | CommonJS | Apr 23, 2018 |

## Frequently asked

**Is vuepress ESM-only?**

vuepress@1.9.10 is a CommonJS package. vuepress ships CommonJS only. require("vuepress") should work on every Node.js version the package supports (>=8.6); the runtime probe has not run for this version. import "vuepress" also works because Node.js and Bun can import CommonJS from ES modules, but only the default export is guaranteed; named imports depend on Node's static analysis of the module.

**Can I import vuepress with ES module syntax?**

Yes. import vuepress from "vuepress" works in Node.js and Bun because they support importing CommonJS modules. Named imports work only when Node.js can statically detect the exports.

**Does vuepress ship TypeScript types?**

No. vuepress ships no type declarations and there is no @types package for it.

## Links

- [vuepress on npm](https://www.npmjs.com/package/vuepress)
- [Source repository](https://github.com/vuejs/vuepress)
- [HTML version](https://canirequire.com/package/vuepress/)
- [JSON version](https://canirequire.com/package/vuepress.json)

---

For scripts and AI agents: any package is at https://canirequire.com/package/<name>/index.md (Markdown) or https://canirequire.com/package/<name>.json (JSON); the site index is https://canirequire.com/llms.txt. Fetch the URL directly; no search needed.
