Skip to content

pnpm install broke after 10.6.1 #9233

@ejekanshjain

Description

@ejekanshjain

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.6.1

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

This is my docker file

FROM node:22-slim
ENV NODE_ENV production
ENV PUPPETEER_SKIP_DOWNLOAD true
ENV PUPPETEER_SKIP_CHROME_DOWNLOAD true
ENV PUPPETEER_SKIP_CHROME_HEADLESS_SHELL_DOWNLOAD true
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
RUN apt-get update && apt-get install gnupg wget -y &&
wget --quiet --output-document=- https://dl-ssl.google.com/linux/linux_signing_key.pub | gpg --dearmor > /etc/apt/trusted.gpg.d/google-archive.gpg &&
sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' &&
apt-get update &&
apt-get install google-chrome-stable -y --no-install-recommends &&
rm -rf /var/lib/apt/lists/*

ENV NODE_OPTIONS="--max-old-space-size=3072"

WORKDIR /app

COPY . /app

RUN npm i -g pnpm

RUN pnpm i --frozen-lockfile --prod false

ENTRYPOINT cd /app && pnpm start

Describe the Bug

After version 10.6.1, it gives me error in my CI pipeline

Step 12/17 : RUN pnpm i --frozen-lockfile --prod false
---> Running in 15f858b90749
Scope: all 12 workspace projects
 ERR_PNPM_OPTIONAL_DEPS_REQUIRE_PROD_DEPS  Optional dependencies cannot be installed without production dependencies
The command '/bin/sh -c pnpm i --frozen-lockfile --prod false' returned a non-zero code: 1

Expected Behavior

Normally it would have installed all packages properly

Which Node.js version are you using?

22

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions