Skip to content

Conversation

@adriandlam
Copy link
Member

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Nov 21, 2025

⚠️ No Changeset found

Latest commit: 7b08344

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Nov 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview Comment Nov 21, 2025 11:21pm
example-nextjs-workflow-webpack Ready Ready Preview Comment Nov 21, 2025 11:21pm
example-workflow Ready Ready Preview Comment Nov 21, 2025 11:21pm
workbench-astro-workflow Error Error Nov 21, 2025 11:21pm
workbench-express-workflow Ready Ready Preview Comment Nov 21, 2025 11:21pm
workbench-hono-workflow Ready Ready Preview Comment Nov 21, 2025 11:21pm
workbench-nitro-workflow Ready Ready Preview Comment Nov 21, 2025 11:21pm
workbench-nuxt-workflow Ready Ready Preview Comment Nov 21, 2025 11:21pm
workbench-sveltekit-workflow Ready Ready Preview Comment Nov 21, 2025 11:21pm
workbench-vite-workflow Ready Ready Preview Comment Nov 21, 2025 11:21pm
workflow-docs Ready Ready Preview Comment Nov 21, 2025 11:21pm

Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@adriandlam adriandlam changed the title chore: setup react router app feat: react router support Nov 21, 2025
@socket-security
Copy link

FROM node:20-alpine AS development-dependencies-env
COPY . /app
WORKDIR /app
RUN npm ci
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Dockerfile is incompatible with the project's package manager. It uses npm and references package-lock.json, but this project is configured to use pnpm with pnpm-lock.yaml.

View Details
📝 Patch Details
diff --git a/workbench/react-router/Dockerfile b/workbench/react-router/Dockerfile
index 207bf93..694fc6c 100644
--- a/workbench/react-router/Dockerfile
+++ b/workbench/react-router/Dockerfile
@@ -1,22 +1,26 @@
 FROM node:20-alpine AS development-dependencies-env
+RUN npm install -g [email protected]
 COPY . /app
 WORKDIR /app
-RUN npm ci
+RUN pnpm install
 
 FROM node:20-alpine AS production-dependencies-env
-COPY ./package.json package-lock.json /app/
+RUN npm install -g [email protected]
+COPY ./package.json pnpm-lock.yaml /app/
 WORKDIR /app
-RUN npm ci --omit=dev
+RUN pnpm install --prod
 
 FROM node:20-alpine AS build-env
+RUN npm install -g [email protected]
 COPY . /app/
 COPY --from=development-dependencies-env /app/node_modules /app/node_modules
 WORKDIR /app
-RUN npm run build
+RUN pnpm run build
 
 FROM node:20-alpine
-COPY ./package.json package-lock.json /app/
+RUN npm install -g [email protected]
+COPY ./package.json pnpm-lock.yaml /app/
 COPY --from=production-dependencies-env /app/node_modules /app/node_modules
 COPY --from=build-env /app/build /app/build
 WORKDIR /app
-CMD ["npm", "run", "start"]
\ No newline at end of file
+CMD ["pnpm", "run", "start"]
\ No newline at end of file

Analysis

Dockerfile incompatible with project's pnpm package manager

What fails: workbench/react-router/Dockerfile uses npm ci and references package-lock.json which doesn't exist. The project is configured for pnpm with pnpm-lock.yaml.

How to reproduce:

# Attempt to build the Docker image
cd workbench/react-router
npm ci

Result:

npm error code EUSAGE
npm error The `npm ci` command can only install with an existing package-lock.json or
npm error npm-shrinkwrap.json with lockfileVersion >= 1.

Expected behavior: The Dockerfile should use pnpm since:

  • Root package.json specifies packageManager: "[email protected]"
  • Project uses pnpm-lock.yaml (exists at repository root)
  • No package-lock.json exists in the repository
  • Monorepo dependencies use pnpm workspace syntax (workspace:*) in workbench/react-router/package.json

Fix applied: Updated Dockerfile to use pnpm:

  • Replaced npm ci with pnpm install (and pnpm install --prod for production stage)
  • Changed file references from package-lock.json to pnpm-lock.yaml
  • Installed pnpm globally in each stage before running commands
  • Updated all npm script invocations to use pnpm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants