Skip to content

node:20.13 breaks building with workspaces from root #2081

Open
@tharvik

Description

@tharvik

Environment

  • Platform: GNU/Linux
  • Docker Version: 24.0.5, build ced0996600
  • Node.js Version: 20.13
  • Image Tag: 20.13

Expected Behavior

Building a workspace aware project without changing workdir.

Current Behavior

npm fails stating that it can't find any workspace: "ERR! No workspaces found!"

Possible Solution

setting WORKDIR to another dir than / before running npm fixes it.
also using node:20.12 instead of node:20 (or node:20.13) fixes it.

Steps to Reproduce

FROM node:20.13

RUN echo '{ "name": "root", "workspaces": ["pkg"] }' > package.json
RUN mkdir -p pkg/
RUN echo '{ "name": "pkg" }' > pkg/package.json
RUN npm -ws pkg get name # random workspace aware cmd

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