Skip to content
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

Docker Build Error: "corepack enable pnpm" Fails with Signature Verification Error #1250

Open
rogoit opened this issue Feb 2, 2025 · 13 comments

Comments

@rogoit
Copy link

rogoit commented Feb 2, 2025

Describe the bug

When building the Docker image for the bolt.diy project, the build process fails with an error related to the corepack enable pnpm command. The error message indicates that there is an issue with verifying the signature of the latest stable version of pnpm.
Steps to Reproduce:

Link to the Bolt URL that caused the error

http://localhost:5173/

Steps to reproduce

Clone the bolt.diy repository.
Navigate to the project directory.
Run the following command to build the Docker image:

docker build . --target bolt-ai-development

Expected behavior

Expected Behavior:
The Docker image should build successfully without any errors.
Actual Behavior:
The build process fails with the following error message:

Error: Cannot find matching keyid: {"signatures":[{"sig":"MEQCIHGqHbvc2zImUPEPFpT4grh6rMYslel+lAjFArx8+RUdAiBfnJA+bgmUvO5Lctfkq+46KKDQdx/8RhLPge3pA+EdHA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"keys":[{"expires":null,"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","keytype":"ecdsa-sha2-nistp256","scheme":"ecdsa-sha2-nistp256","key":"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Olb3zMAFFxXKHiIkQO5cJ3Yhl5i6UPp+IhuteBJbuHcA5UogKo0EWtlWwW6KSaKoTNEYL7JlCQiVnkhBktUgg=="}]}

Screen Recording / Screenshot

No response

Platform

Operating System: Ubuntu
Docker Version: 27.5.1
Node.js Version: v21.7.3

Provider Used

No response

Model Used

No response

Additional context

Possible Solution:
To resolve the issue, we can modify the Dockerfile to install a specific version of pnpm instead of relying on corepack to fetch the latest stable version. Update the Dockerfile as follows:

-RUN corepack enable pnpm && pnpm install
+RUN npm install -g [email protected] && pnpm install

This works for me.

This change will install pnpm version 8.4.0 globally using npm and then use that specific version to install the project dependencies.
Additional Context:

The issue seems to be related to the signature verification process when fetching the latest stable version of pnpm using corepack.
The error occurs consistently when building the Docker image using the current Dockerfile.

Please let me know if you need any further information or if you have any suggestions for resolving this issue. Also would be a great honor to do a PR and contribute to this great project.

@steveannett
Copy link

steveannett commented Feb 3, 2025

According to a comment in the pnpm github this is an issue cause by corepack, here is a link to the bug report in corepack's github: nodejs/corepack#612

@rogoit
Copy link
Author

rogoit commented Feb 3, 2025

@steveannett

...and this is a solution for an easier setup. So do we add it or ducumentate something for it to help people like to a better start?

@Madhushan1996
Copy link

@rogoit Did you manage to fix this?

@rogoit
Copy link
Author

rogoit commented Feb 3, 2025

@Madhushan1996

I will open PR this evening and mention this issue here. See you
Roland

@danielo515
Copy link

Is any change in end user side required?

iaminawe added a commit to iaminawe/bolt.diy that referenced this issue Feb 3, 2025
@Carcalto
Copy link

Carcalto commented Feb 4, 2025

try to edit the Dockerfile found inside the Bolt folder ---

"RUN corepack enable pnpm && pnpm install"

--- by ---

"RUN npm install -g pnpm && pnpm install"

--- this in theory causes PNPM to be installed without depending on Corepack. If that doesn't work, just go back to the original

@jdros15
Copy link

jdros15 commented Feb 5, 2025

Dockerfile.pdf

I asked ChatGPT to fix the "Dockerfile" file.
You can download it and replace before running the docker command. Worked for me.
(remove the .pdf)

@rogoit
Copy link
Author

rogoit commented Feb 5, 2025

PR #1266

Thx for your passion.

@BaptisteCDC
Copy link

I correct on my side like this https://github.com/stackblitz-labs/bolt.diy/pull/1261/files

@rogoit
Copy link
Author

rogoit commented Feb 5, 2025

@BaptisteCDC Based on my issue here. Please let me the contribution ;)

@BaptisteCDC
Copy link

yes no problem, I correct it yesterday to launch it on my azure web app, I hesitate between add this install or modify the package.json

@rogoit
Copy link
Author

rogoit commented Feb 5, 2025

@BaptisteCDC so thanks a lot. Please give me final line. I also changed one const var to make it more simplified.

I will do the change direct and then push.

@rogoit
Copy link
Author

rogoit commented Feb 5, 2025

@BaptisteCDC new PR #1266

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

No branches or pull requests

7 participants