fix(corepack): specify explicit pnpm version to avoid signature verif… #1327
+36
−19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix(corepack): specify explicit pnpm version to avoid signature verification error on M3 macOS fresh installs
Description
Problem:
Some M3 macOS fresh installs with fresh Docker containers and fresh Node.js installations may experience a Corepack signature verification error during the pnpm installation process. This error occurs because Corepack fails to verify the digital signature for the default pnpm binary, leading to build failures.
Solution:
This pull request addresses the issue by explicitly preparing a known, stable pnpm version using the following command in our Dockerfile:
RUN corepack enable pnpm && corepack prepare [email protected] --activate && pnpm install --frozen-lockfile
This change ensures that the Docker build process uses a verified pnpm version, bypassing the signature verification error and ensuring consistent builds on fresh installations.
Testing:
• Built the Docker image on an M3 macOS system with a fresh install of Node.js.
• Verified that the image builds successfully without the Corepack error.
• Ran tests to ensure the application behavior remains consistent.
Additional Notes:
• The pnpm version (8.7.0) is explicitly set. Future updates may require revisiting this version.
• This fix is specific to environments that experience this issue, particularly on M3 macOS systems with new setups.
Please review the changes and let me know if any further modifications are needed.