Skip to content

Warn about two or more packages having the same npm package.json name #1046

Closed

Description

@ferk6a

I struggled with the fact that the node_modules of one of my projects was empty and the other one was full of things. Then I realized I made them both the same name in package.json, Could I've been warned?

Expected Behavior

Warn or error if two or more packages have the same name.

Current Behavior

Lerna does some weird things if there are multiple packages with the same name, like leaving one directory empty and the other one full of things, while creating symlinks correctly.

Steps to Reproduce (for bugs)

  1. Create two packages with the same package.json name
  2. Run lerna bootstrap on the root directory
  3. Watch weird things happen if you have some dependencies, while scratching your head thinking why is this happening

Context

Sometimes you forget you named two packages with the same package.json name because they are linked to the same project (like backend and frontend in my case), but the folders are still named properly. It happened mostly because of a merge from separated repos to a bigger lerna managed monorepo.

Your Environment

Lerna 2.2.0

Activity

  1. evocateur commented on Oct 5, 2017

    @evocateur
    Member

    Yeah, that does sound like something worth erroring about.

  2. lock commented on Dec 28, 2018

    @lock

    This thread has been automatically locked because there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  3. locked as resolved and limited conversation to collaborators on Dec 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions