Skip to content

[DOCS] Potential missing or hard to find information on using workspaces #4800

Open

Description

@metawrap-dev

Is there an existing issue for this?

  • I have searched the existing issues

This is a CLI Docs Problem, not another kind of Docs Problem.

  • This is a CLI Docs Problem.

Description of Problem

When running npm install using workspaces, common modules are installed in the root. There are some that I don't want this to happen to, but there seems to be no way or no documented way to achieve this.

Is this a feature issue or just not available in the documentation?

Potential Solution

Provide simple and clear instructions in workspace docs on how to exclude modules from being optimised into the root.

Affected URL

No response

Activity

  1. metawrap-dev commented on May 3, 2022

    @metawrap-dev
    Author

    I have located this discussion. npm/rfcs#375 For what I would assume is a common use-case, it's hard to find a simple answer.

  2. metawrap-dev commented on May 3, 2022

    @metawrap-dev
    Author

    Also this npm/rfcs#287

  3. frank-dspeed commented on Aug 26, 2022

    @frank-dspeed

    the concept is simple you should simply create

    / package.json => referencing the workspace sets inside workspaces but you should never use npm without the -w or -W flags from that dir
    /node_modules => shared between all
    /packages => contains all packages (source)
    /workspaces/workspace_set_1
    /workspaces/workspace_set_2
    
    
    
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

    Documentationdocumentation related issueNeeds Triageneeds review for next steps

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions