Skip to content

Document pnpm prerequisite for fern docs dev #5457

Merged
devalog merged 3 commits into
mainfrom
fern/document-pnpm-prereq
May 11, 2026
Merged

Document pnpm prerequisite for fern docs dev #5457
devalog merged 3 commits into
mainfrom
fern/document-pnpm-prereq

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api Bot commented May 11, 2026

Summary

Updates the Preview changes page to call out that pnpm must be installed globally for fern docs dev to work, even if a project uses npm or yarn. fern docs dev shells out to pnpm internally to install dependencies like esbuild for the preview bundle, so missing pnpm produces a Failed to install required package error during bootstrap.

Changes

  • Added pnpm to the Prerequisites list at the top of preview-changes-locally.mdx.
  • Added a <Note> clarifying that pnpm is required globally even when projects use npm or yarn.
  • Added a new entry to the Common errors section covering Failed to install required package due to error: Command failed with exit code 1: pnpm i esbuild, including the follow-up [ERR_PNPM_IGNORED_BUILDS] case (run pnpm approve-builds).

Why

Surfaced by a customer-support thread where a user migrating to a new machine hit this error and was unsure whether they needed to switch their project to pnpm. The fix is to install pnpm globally; the project's package manager doesn't need to change.

Requested by: Fern Support

@fern-api fern-api Bot requested a review from devalog as a code owner May 11, 2026 16:45
@fern-api
Copy link
Copy Markdown
Contributor Author

fern-api Bot commented May 11, 2026

Requested by: devin
Slack thread: View conversation


`fern docs dev` and `fern generate --docs` must be run from a directory that contains a [`fern/` folder](/learn/docs/getting-started/project-structure) with a `docs.yml` inside. Change into your project directory, or add a `docs.yml`.

#### Failed to install required package due to error: Command failed with exit code 1: pnpm i esbuild
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [vale] reported by reviewdog 🐶
[Microsoft.HeadingColons] Capitalize ': p'.


`fern docs dev` and `fern generate --docs` must be run from a directory that contains a [`fern/` folder](/learn/docs/getting-started/project-structure) with a `docs.yml` inside. Change into your project directory, or add a `docs.yml`.

#### Failed to install required package due to error: Command failed with exit code 1: pnpm i esbuild
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 [vale] reported by reviewdog 🐶
[FernStyles.FirstPerson] Use first person (such as ' i') sparingly.

@github-actions
Copy link
Copy Markdown
Contributor

🌿 Preview your docs: https://fern-preview-fern-document-pnpm-prereq.docs.buildwithfern.com/learn

Here are the markdown pages you've updated:

@devalog devalog merged commit f0a082b into main May 11, 2026
2 checks passed
@devalog devalog deleted the fern/document-pnpm-prereq branch May 11, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant