Skip to content

bug: trigger deploy hardcodes npm install, breaking Yarn workspaces #2914

@isshaddad

Description

@isshaddad

Provide environment information

N/A - This affects the generated Dockerfile, not the local environment

Describe the bug

The trigger deploy command generates a Dockerfile that hardcodes npm i --no-audit --no-fund --no-save --no-package-lock on line 872 of packages/cli-v3/src/deploy/buildImage.ts, regardless of the project's actual package manager.

This breaks Yarn workspaces because:

  • npm doesn't understand Yarn's workspaces.nohoist configuration
  • npm doesn't support Yarn's selective resolutions
  • npm installs packages in different locations than Yarn, breaking patch-package setups

Expected behavior: The CLI should detect the package manager from lockfiles (yarn.lock, pnpm-lock.yaml, package-lock.json) and use the appropriate install command:

  • yarn install --frozen-lockfile for Yarn
  • pnpm install --frozen-lockfile for pnpm
  • npm ci for npm

Reproduction repo

n/a

To reproduce

  1. Create a Yarn monorepo with workspaces.nohoist in package.json
  2. Run trigger deploy
  3. Observe build failure with npm workspace errors, or packages installed in wrong locations

Additional information

No response

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