Configure vite react app to use pnpm

affanisautomated
PRO

12 days ago

I have a vite react app that is using npm but I need it to use pnpm. I'm not sure how to fix this. Do I need to make a nixpacks file here for this?

Solved

0 Replies

affanisautomated
PRO

12 days ago

c243ded6-9e79-4752-857d-5b6f31fd8cc2


affanisautomated
PRO

12 days ago

It's supposed to use pnpm if a pnpm-lockfile is found however the logs still show it running "npm i"


12 days ago

Hey, can you switch the builder from Nixpacks to Railpack?


affanisautomated
PRO

12 days ago

Tried with that but it still tries to run "npm install"


12 days ago

Can you try adding a packageManager field to your package.jsonhttps://railpack.com/languages/node/#package-managers ?


affanisautomated
PRO

12 days ago

Building with this


affanisautomated
PRO

12 days ago

@uxuz I ran into this issue before and for my nestjs backend, I just created a nixpack file. But if I have this in the packagejson and I use railpack, do I still need the nixpakcs file?


affanisautomated
PRO

12 days ago

P.S: that worked the deployment ran through


12 days ago

The Nixpacks file would be useless if you are using Railpack. However, the same approach should also work with Nixpacks as outlined here: https://nixpacks.com/docs/providers/node#corepack.


affanisautomated
PRO

12 days ago

Got it


affanisautomated
PRO

12 days ago

Well that solved the issue


affanisautomated
PRO

12 days ago

Thank you! <:prayge:1231933593924927560>


12 days ago

You are welcome! Marking this thread as solved.


12 days ago

!s


Status changed to Solved uxuz 12 days ago


Configure vite react app to use pnpm - Railway Help Station