fix(docker): update node version and use pnpm#106
Conversation
Resolves reactplay#45. Updates Dockerfile to use Node 20 and pnpm install instead of npm ci to fix build errors caused by engine incompatibility and dependency conflicts.
✅ Deploy Preview for reactkolkata ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Hi @priyankarpal , Just wanted to add a note regarding the Docker build. While the These vulnerabilities are separate from the original build issue. Addressing them might involve further updates to the base image or adding specific security patches. Would you like me to create a new issue to track these vulnerabilities so they can be addressed separately? I'd be happy to investigate them further if needed. Thanks! |
Yes, definitely create a separate issue for the security vulnerabilities. Also Use more specific Node version with latest security patches Add security updates at the start of each stage If vulnerabilities are severe:
|
Resolves #45. Updates Dockerfile to use Node 20 and pnpm install instead of npm ci to fix build errors caused by engine incompatibility and dependency conflicts.
Summary
This PR addresses the issues preventing the project from building and running using the
docker-compose upcommand as described in the README. The primary causes were an outdated Node.js version specified in the Dockerfile and the use ofnpm ciwhich conflicted with project dependencies and thepnpm-lock.yamlfile.Changes
Dockerfile:node:18-alpinetonode:20-alpineto meet dependency engine requirements.RUN npm ci --legacy-peer-depsstep withRUN npm install -g pnpm && pnpm install --frozen-lockfileto ensure dependencies are installed usingpnpm, consistent with the project's lock file and local setup.Testing
I tested these changes locally by:
Dockerfilewith the updated version.docker-compose up --build.http://localhost:3000.Related Issue
Resolves #45
Notes
node:20-alpine) after the build. Addressing these could be handled in a separate, future issue. This PR focuses solely on fixing the build failure.