Skip to content

Error caused by lerna.json without "packages" #272

@jeffrson

Description

@jeffrson

I don't know how it behaved in the past, but nowadays "lerna.json" without "packages" is perfectly valid - IMO with both lerna and lerna-lite.

When there is a lerna.json, created by lerna init (lerna-lite or lerna), as simple as

{
  "$schema": "node_modules/@lerna-lite/cli/schemas/lerna-schema.json",
  "version": "0.0.0"
}
> ultra --info

only shows this error message

error Cannot read properties of undefined (reading 'length')

However, with

{
  "$schema": "node_modules/lerna/schemas/lerna-schema.json",
  "packages": [ "packages/*" ],
  "version": "0.0.0"
}

it works:

Detected workspaces: yarn, lerna
Workspace yarn with npm
 0  root at .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions