-
Notifications
You must be signed in to change notification settings - Fork 106
feat: react router support #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: refactor-rollup-plugin_
Are you sure you want to change the base?
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
| FROM node:20-alpine AS development-dependencies-env | ||
| COPY . /app | ||
| WORKDIR /app | ||
| RUN npm ci |
There was a problem hiding this comment.
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 pnpm@10.20.0
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 pnpm@10.20.0
+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 pnpm@10.20.0
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 pnpm@10.20.0
+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 ciResult:
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.jsonspecifiespackageManager: "pnpm@10.20.0" - Project uses
pnpm-lock.yaml(exists at repository root) - No
package-lock.jsonexists in the repository - Monorepo dependencies use pnpm workspace syntax (
workspace:*) inworkbench/react-router/package.json
Fix applied: Updated Dockerfile to use pnpm:
- Replaced
npm ciwithpnpm install(andpnpm install --prodfor production stage) - Changed file references from
package-lock.jsontopnpm-lock.yaml - Installed pnpm globally in each stage before running commands
- Updated all npm script invocations to use pnpm

No description provided.