Configure vite react app to use pnpm
affanisautomated
PROOP

9 months 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

14 Replies

affanisautomated
PROOP

9 months ago

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


affanisautomated
PROOP

9 months ago

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


9 months ago

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


affanisautomated
PROOP

9 months ago

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


9 months ago

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


affanisautomated
PROOP

9 months ago

Building with this


affanisautomated
PROOP

9 months 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
PROOP

9 months ago

P.S: that worked the deployment ran through


9 months 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
PROOP

9 months ago

Got it


affanisautomated
PROOP

9 months ago

Well that solved the issue


affanisautomated
PROOP

9 months ago

Thank you! <:prayge:1231933593924927560>


9 months ago

You are welcome! Marking this thread as solved.


9 months ago

!s


Status changed to Solved uxuz 9 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...