How to change the package manager from npm to pnpm?

karthickthankyouHOBBY

a year ago

I use pnpm workspaces. I can not get to install as I got "Unsupported URL Type "workspace:": workspace:^"

Then I used the env variable "NIXPACKSINSTALLCMD=pnpm i" to change the install command.

Now Im getting "pnpm: command not found"

I notice that the setup uses npm-9_x how do I change this to pnpm?

I also tried adding { "packageManager": "pnpm@8.1.0", } in the package.json.

context: aa9e0899c91f0cbc44d1b4815951e073

╔════════ Nixpacks v1.20.0 ═══════╗
║ setup │ nodejs18, npm-9x ║
║─────────────────────────────────║
║ install │ pnpm i ║
║─────────────────────────────────║
║ build │ pnpm build ║
║─────────────────────────────────║
║ start │ npm run start ║
╚═════════════════════════════════╝

Please help me.

Thanks!

Solved

2 Replies

a year ago

I don't think you can do this without building from a Dockerfile, unfortunately


a year ago

pnpm should automatically be used if you have a lock file generated from pnpm, and only from pnpm. for example if you had a package lock file from npm then npm would be used instead


Status changed to Solved railway[bot] over 1 year ago


How to change the package manager from npm to pnpm? - Railway Help Station