1 min read

WORKSPACE_MISSING_PACKAGE_JSON

All directories that match a workspace glob must include a package.json file.
Table of Contents

Conformance is available on Enterprise plans

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.

The repository configures pnpm workspaces in this file:

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.

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.

Last updated on May 18, 2024