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

[Bug]: application with Nixpacks and pnpm v9+ #2250

Open
gBusato opened this issue May 20, 2024 · 2 comments
Open

[Bug]: application with Nixpacks and pnpm v9+ #2250

gBusato opened this issue May 20, 2024 · 2 comments

Comments

@gBusato
Copy link

gBusato commented May 20, 2024

Description

Hey guys,

I was having some trouble deploying a NextJS application using Nixpacks and pnpm v9.1.0 as package manager.

The typical error while deploying was happening during the pnpm install :

ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent

After some research, I found out that currently ( 2024/05/20 ) Nixpack doesn't support pnpm v9.0+ and only v8.0.

One of the solution is to downgrad your pnpm version, but I couldn't due to some other projects running on pnpm v9.0.

Well I did found a solution on this github post.

Here are the steps to make it work :

  1. Create a Nixpacks configuration file at the root of your projet
  2. Add the following code inside the file
providers = ["node"]

[phases.install]
cmds = ["npm install -g corepack", "corepack enable", "corepack prepare pnpm@9.1.0 --activate", "pnpm install"]
  1. deploy and enjoy

With the Nixpacks file forcing the install of pnpm v9.1 it should work. Also replace version 9.1.0 with your current running version at the time you are looking at the solution

I hope it will helps some of you ! Have fun and happy coding

Minimal Reproduction (if possible, example repository)

Having any node js project and pnpm v9.0+ has current package manager and a pnpm-lock.yaml file with lockfileVersion: '9.0' or higher

Exception or Error

ERR_PNPM_NO_LOCKFILE  Cannot install with "frozen-lockfile" because pnpm-lock.yaml is absent

Version

v4.0.0

@fcpauldiaz
Copy link

I fixed this by adding this to the package.json

"packageManager": "pnpm@9.1.1"

@GifCo
Copy link

GifCo commented May 30, 2024

I fixed this by adding this to the package.json

"packageManager": "pnpm@9.1.1"

THanks for this! Worked for me.

This is beyond ridiculous that this is not in the doc's and or automated.

benedicteb added a commit to benedicteb/simple-chat-api that referenced this issue Jun 5, 2024
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

3 participants