Changing Pnpm Version

Trying to change pnpm version to 9.4.0Current docs says to define it at package.jsonI have it defined:

{

...,

"packageManager": "pnpm@9.4.0",

}

But unfortunately on build:

╔═══════════════════════ Nixpacks v1.24.0 ═══════════════════════╗
║ setup      │ nodejs_20, pnpm-8_x                               ║
║────────────────────────────────────────────────────────────────║
║ install    │ npm install -g corepack@0.24.1 && corepack enable ║
║            │ pnpm i --frozen-lockfile                          ║
║────────────────────────────────────────────────────────────────║
║ build      │ pnpm run build                                    ║
║────────────────────────────────────────────────────────────────║
║ start      │ pnpm run start                                    ║
╚════════════════════════════════════════════════════════════════╝

How do really define that?

Solved

7 Replies

10 months ago

I'm not seeing any errors here, that's only the build plan table, use this to send your full build logs -

https://bookmarklets.up.railway.app/log-downloader/


There is no error being thrown. But its not following the cofigured pnpm version. If look at the Nix config that comes on top of the logs, it states pnpm 8, and in the preparation process it downloads pnpm 8.15


The logs

Attachments


10 months ago

What makes you say it's not using the correct pnpm version?


╔═══════════════════════ Nixpacks v1.24.0 ═══════════════════════╗
║ setup      │ nodejs_20, pnpm-8_x                               ║
#8 26.40 building '/nix/store/jb9hy27i1r7vbrhxf6j0wg1whp0iaflf-pnpm-8.15.8.tgz.drv'...

#8 26.69
#8 26.69 trying https://registry.npmjs.org/pnpm/-/pnpm-8.15.8.tgz

#8 26.70   % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
#8 26.70                                  Dload  Upload   Total   Spent    Left  Speed

#8 26.87 100 3720k  100 3720k    0     0  20.4M      0 --:--:-- --:--:-- --:--:-- 20.5M

These line from logs... Nix is installing 8.15.8If I remove the packageManager property from package.json nothing changes too...


10 months ago

The packageManager property is not going to change the setup packages.

It's going to tell corepack to later install pnpm V9 before running the install command, and from your build logs, it's doing just that -

npm install -g corepack@0.24.1 && corepack enable
pnpm i --frozen-lockfile   

Status changed to Solved railway[bot] 10 months ago


10 months ago

You mentioned you were not experiencing any issues, so I'm going to close this out, feel free to open another post if you are experiencing issues with the build.


Changing Pnpm Version - Railway Help Station