# Fix Docusaurus plugin-content-docs "plugin not found" failures

## TL;DR

The site config references the docs plugin but Node cannot resolve it: either the package was never installed, or it is listed manually in plugins while preset-classic already bundles it. Install the package (or remove the redundant manual entry), then rebuild. The build passes because the plugin name now resolves to real code.

## The error

```text
Error: plugin not found: @docusaurus/plugin-content-docs
    at loadPlugin (node_modules/@docusaurus/core/lib/server/plugins/index.js)
```

## Steps

1. Check whether it is installed: `npm ls @docusaurus/plugin-content-docs`.
   Expected: either a version tree or an '(empty)' / not-found note.

2. If it is missing, install it: `npm install @docusaurus/plugin-content-docs`.
   Expected: the package appears in package.json dependencies and node_modules.

3. If the site uses @docusaurus/preset-classic, do NOT also list the plugin in the `plugins` array of docusaurus.config.js - the preset already includes it. Remove the manual entry instead of installing.
   Expected: the plugin is provided exactly once: by the preset or by the manual entry, not both.

4. Check the plugins array for typos in the package name.
   Expected: the name matches the installed package exactly.

5. Rebuild: `npm run build`.
   Expected: the plugin loads and the docs routes build with no plugin error.

## Use this when

- the build fails naming @docusaurus/plugin-content-docs as not found
- a Docusaurus site scaffolded by hand rather than the CLI template
- the plugin was removed from package.json during a dependency cleanup

## Not for this skill when

- 'broken markdown link' (content problem, the plugin loaded fine)
- 'MDX compilation failed' (a page does not parse)
- a plugin that loads but misbehaves (wrong options, not a resolution failure)

## Variant phrasings

- docusaurus plugin-content-docs not found
- docusaurus Error plugin not found build
- docusaurus preset-classic plugin-content-docs duplicate
- @docusaurus/plugin-content-docs missing

## Why it happens

Docusaurus resolves each entry in the config's plugins array as a Node module at startup. The docs plugin ships inside @docusaurus/preset-classic, which most templates use, so hand-edited configs often add a second manual entry or reference the plugin in a project that never installed it. Either way the resolver fails before any page builds, which is why the error names the plugin rather than a file.

## Edge cases

- After changing plugins, delete the .docusaurus cache directory; stale plugin state there can survive a config fix.
- Version skew between the plugin and @docusaurus/core produces cryptic errors later in the build - keep all @docusaurus/* packages on the same version.
- The same 'plugin not found' shape applies to any community plugin; the diagnosis (npm ls, then install or de-duplicate) is identical.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_dP8eudKJtuQbI9UzUKfHWg
