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

Fix pnpm on runtime #49

Open
wants to merge 1 commit into
base: 18.x
Choose a base branch
from
Open

Fix pnpm on runtime #49

wants to merge 1 commit into from

Conversation

sneridagh
Copy link
Member

@ericof This will fix the problem that pnpm tries to download on runtime.

However, it has a flaw, because if anybody updates the packageManager key in the project (eg. it's not in sync with Volto's), it will fail again in containers without outside access.

So somehow we have to change the Dockerfile in apps as well :( Let's talk when you are around.

@sneridagh sneridagh requested a review from ericof October 23, 2024 10:20
@sneridagh sneridagh changed the title Fixpnpmonruntime Fix pnpm on runtime Oct 23, 2024
@sneridagh sneridagh changed the base branch from 17.x to 18.x October 23, 2024 10:21
@@ -25,7 +25,10 @@ USER node

# Set working directory to /app
WORKDIR /app
RUN corepack use pnpm@9
# Upgrades pnpm to the latest version globally
RUN corepack install -g pnpm
Copy link
Member

Choose a reason for hiding this comment

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

@sneridagh Why do we need a global one and not just the one for the project?

Copy link
Member Author

Choose a reason for hiding this comment

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

@davisagli we can remove this, but I thought that we might want to have the global one updated too (it's pnpm 8 still if 20-slim is used, at least the last time I checked). So we first update it globally, then just install the specified version in package.json afterwards.

Copy link
Member

Choose a reason for hiding this comment

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

@sneridagh But why do we need a global installation in the image at all? Who or what will try to run pnpm inside the container but not in the /app directory?

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