Skip to content

Make lerna a dependency rather than a devDependency #6718

Closed

Description

@nerrad

Describe the bug
For context see #6658 . My plugin (I'm assuming others might as well) has GB/master defined as a devDependency because we use gutenberg in jest unit tests. However, since the mentioned pull was merged in we're getting failed builds in travis. Specifically, this is the cause:

> gutenberg@2.8.0 postinstall /home/travis/build/eventespresso/event-espresso-core/node_modules/gutenberg
> lerna bootstrap --hoist
sh: 1: lerna: not found

@aduth and I had a chat about this in slack and it looks like one resolution would be to move lerna from being a devDependency to being a dependency.

Other solutions could be removing the post-install script, or modifying it so it only runs in the context of Gutenberg itself.

Activity

  1. ntwb commented on May 12, 2018

    @ntwb
    Member

    No objections to this from me.

    Once we've got all the modules published we should add/update the docs on including Gutenberg and its modules for running tests as you are in your eventespresso repo.

  2. added
    FrameworkIssues related to broader framework topics, especially as it relates to javascript
    Good First IssueAn issue that's suitable for someone looking to contribute for the first time
    on May 14, 2018
  3. gziolo commented on May 15, 2018

    @gziolo
    Member

    I guess it's a temporary solution until we have all packages published. Let me open PR for that.

    In general, you shouldn't need to do it. You can double check looking at package.json files from Babel, Jest or create-react-app.

  4. aduth commented on May 23, 2018

    @aduth
    Member

    In general, you shouldn't need to do it.

    Can you clarify what's meant by "it" here? Installing Gutenberg as a dependency?

    To me, the general issue is that anything used by postinstall should be defined as a dependencies, since these are run automatically by consuming projects and the consuming project won't install devDependencies.

  5. gziolo commented on May 24, 2018

    @gziolo
    Member

    In general, you shouldn't need to do it.

    Can you clarify what's meant by "it" here? Installing Gutenberg as a dependency?

    @aduth, I meant to specify Lerna in dependencies. All monorepos aren't designed to be used as a dependency.
    With #6752 we moved Lerna to dependencies to make it work in the scenario when someone uses it as the dependency regardless. We will move it back to devDependencies when all modules are published to npm.

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

    FrameworkIssues related to broader framework topics, especially as it relates to javascriptGood First IssueAn issue that's suitable for someone looking to contribute for the first time

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions