Contributing Docs Missing Required Pnpm Build Step Before Pnpm Dev On Fresh Clone
The Next.js contributing guide does not instruct contributors to run `pnpm build` before `pnpm dev`. On a fresh clone, `pnpm dev` fails due to missing generated artifacts, leading to cascading module not found and TypeScript errors.
The Local Development section of contributing/core/developing.md omits the initial full build step. Fresh clones lack prebuilt dist files and type declarations for packages like @next/polyfill-module, @next/font, and eslint-config-next, causing `pnpm dev` to fail when turbo attempts to run watch tasks that depend on those artifacts.
1. Clone the Next.js repository canary branch with `git clone --depth 1 --single-branch`.
2. Run `pnpm install`.
3. Run `pnpm dev`.
4. Observe multiple ELIFECYCLE failures, missing module errors, and TypeScript declaration issues.
5. Run `pnpm build` followed by `pnpm dev`; the development server starts successfully.
Fixing Code Block
--- a/contributing/core/developing.md
+++ b/contributing/core/developing.md
@@ -10,6 +10,10 @@
### Local Development
+Note: On a fresh clone, run `pnpm build` before `pnpm dev` to generate required artifacts.
+
To start the development server:
```bash
pnpm dev
```
The documentation patch adds an explicit instruction to run `pnpm build` before `pnpm dev`. This ensures all generated files, type declarations, and polyfill bundles are present before watch-mode tasks start, preventing cascading failures on fresh clones.
Edge Case Audit
This is a documentation-only change and poses no runtime or production risk. No rollback is needed, but contributors should be aware that if the build step is skipped or fails, `pnpm dev` will continue to exhibit the same errors. The build step is not intended for production deployments.