how do i update pnpm in nixpack before installing?
I'm trying to do npm i -g pnpm, but railway seems to be automatically detecting my pnpm-lock and is just doing pnpm install before those build scripts.
13 Replies
Project ID:
N/A
N/A
7c98ae62-dafb-4aad-82bc-463906350ad9
install before build is how it's supposed to work ??
usually i would include "npm i -g pnpm; pnpm install" in my build script ie. render.com
or, there would be a dedicated "install" script, ie. vercle
but in this case it seems that the install script is automatically detected, so i can't update pnpm before then
and it errors out
show me the error please
[stage-0 6/10] RUN --mount=type=cache,id=s/ce8b2188-8081-4b6f-a77e-eebbf311358f-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile:#10 5.581 Your pnpm version is incompatible with "/app". #10 5.581 #10 5.581 Expected version: >=8.6.3 #10 5.581 Got: 7.33.3 #10 5.581 #10 5.581 This is happening because the package's manifest has an engines.pnpm field specified. #10 5.581 To fix this issue, install the required pnpm version globally. #10 5.581 #10 5.581 To install the latest version of pnpm, run "pnpm i -g pnpm". #10 5.581 To check your pnpm version, run "pnpm -v". ----- Dockerfile:20 ------------------- 18 | ENV NIXPACKS_PATH /app/node_modules/.bin:$NIXPACKS_PATH 19 | COPY . /app/. 20 | >>> RUN --mount=type=cache,id=s/ce8b2188-8081-4b6f-a77e-eebbf311358f-/root/local/share/pnpm/store/v3,target=/root/.local/share/pnpm/store/v3 pnpm i --frozen-lockfile 21 | 22 | # build phase ------------------- ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile" did not complete successfully: exit code: 1 Error: Docker build failed
you need pnpm v8 right?
yes!
nixpacks doesn't have support for pnpm v8 yet
I have put in a request myself, so in the mean time, you may want to move to a Dockerfile based build
i see, ok! thank u
I'm sure there's plenty of examples for that online
the dockerfile worked well :)
thanks!
well that was fast, happy you got it working!