---
title: WORKSPACE_MISSING_PACKAGE_JSON
product: vercel
url: /docs/conformance/rules/WORKSPACE_MISSING_PACKAGE_JSON
type: conceptual
prerequisites:
  []
related:
  []
summary: All directories that match a workspace glob must include a package.json file.
install_vercel_plugin: npx plugins add vercel/vercel-plugin
---

# WORKSPACE_MISSING_PACKAGE_JSON

> **🔒 Permissions Required**: Conformance

All directories that match a glob used to configure package manager workspaces
must be defined as a package and contain a `package.json` file. This check
prevents confusion where a new directory may be placed within a directory that
is configured to be a workspace but the new directory is not actually a
workspace.

## Example

The repository configures pnpm workspaces in this file:

```yaml filename="pnpm-workspace.yaml"
packages:
  - 'apps/*'
  - 'packages/*'
```

If a directory is defined in `packages/not-a-package`, then this test will fail
saying that the `not-a-package` directory must contain a `package.json` file.

## How to fix

Directories that match a workspace glob but do not have a `package.json` file
should either be converted to a package, be moved to a different directory, or
be excluded in the workspaces configuration.


---

[View full sitemap](/docs/sitemap)
