R
Railway

✋|help

pnpm not found

Hholy.shnikes8/27/2023
Hi! I'm having trouble building my app, and haven't had success with any of the suggestions with other "pnpm not found" searches.
My railway.json:
{
  "$schema": "https://railway.app/railway.schema.json",
  "build": {
    "builder": "NIXPACKS",
    "nixpacksPlan": {
      "providers": ["python"],
      "phases": {
        "setup": {
          "nixPkgs": ["..."]
        }
      }
    },
    "buildCommand": "pnpm i --frozen-lockfile --force && pnpm -F frontend build"
  },
  "deploy": {
    "startCommand": "python manage.py migrate && python manage.py collectstatic --no-input && gunicorn faves_project.wsgi",
    "restartPolicyType": "ON_FAILURE",
    "restartPolicyMaxRetries": 10
  }
}

The build error I'm seeing:
#12 [stage-0 8/10] RUN pnpm i --frozen-lockfile --force && pnpm -F frontend build
#12 0.295 /bin/bash: line 1: pnpm: command not found
#12 ERROR: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile --force && pnpm -F frontend build" did not complete successfully: exit code: 127
-----
> [stage-0 8/10] RUN pnpm i --frozen-lockfile --force && pnpm -F frontend build:
0.295 /bin/bash: line 1: pnpm: command not found
-----
Dockerfile:24
-------------------
22 | # build phase
23 | COPY . /app/.
24 | >>> RUN pnpm i --frozen-lockfile --force && pnpm -F frontend build
25 |
26 |
-------------------
ERROR: failed to solve: process "/bin/bash -ol pipefail -c pnpm i --frozen-lockfile --force && pnpm -F frontend build" did not compl

I have a pnpm-lock.yaml in my root directory.
My project id: 90e8bbd5-6381-4906-9853-3d5ea1445654
Solution:
try extending your nixPkgs array with nodePackages.pnpm
Jump to solution
Solution
BBrody8/27/2023
try extending your nixPkgs array with nodePackages.pnpm
Hholy.shnikes8/27/2023
Hm, not sure what you mean
BBrody8/27/2023
take a look at your own railway.json again please
do you see your nixPkgs array?
Hholy.shnikes8/27/2023
yes
BBrody8/27/2023
append nodePackages.pnpm to that array
Hholy.shnikes8/27/2023
Just "nixPkgs": ["...", nodePackages.pnpm]?
BBrody8/27/2023
well it's a string so it needs to be quoted
Hholy.shnikes8/27/2023
Yep, okay, that's why I was asking specifically what you meant by extend
BBrody8/27/2023
vscode can validate the railway.json for you
it can't tell you if it will do what you intend, but it will tell you if it's valid
Hholy.shnikes8/27/2023
I was editing directly on a test branch in the github ui
anyway, thanks
BBrody8/27/2023
ah lol interesting
did it work?
Hholy.shnikes8/27/2023
yep!
BBrody8/27/2023
awesome!

Looking for more? Join the community!

Recommended Posts
Do you guys have prepaid options?Say I pay 5$ once and I get to use those 5$ worth of resources all year round. I'd rather do that thChange Heroku to RailwayI need more info because I have a problem with Heroku with my hosted proyect there WebSocket doesnt I am getting this error on my deployment```console GET failed with status code 403 (a proxy could be disallowing the use of 'Upgrade: derp')Flask app wont work with port 0.0.0.0application not respondingmemory usage doesn't decreasememory usage of one of my python processes was instantly increased to ~2700 mb, it was my mistake, bAutomated Postgres backup onto a volume ?Since now the project I was developing for a while is almost ready for production, we need to make show can i deploy my vue projecti get this errorHosting Django backend and React frontend from the same DomainI have two services, one for my backend and one for my frontend. They currently have two separate doResponse Pending with OpenAIHi I have SAAS website running on Railway using OpenAI with Next js , the problem is the endpoint noDjango backend fails to respondWhen I click on the url for my django backend (I am using react frontend in a separate service) I geReflexHi, someone deploy reflex.dev in railway? do you have a guide?The new log explorer is great, Is it possible to show the service name in there ?Currently in the log explorer the service name is an ID and I was wondering if you plan to show the What is a good / recommended resource use for a web app? Plus question about scaling.I am deploying a few applications for a client of mine. It is a multi-tenant app made in sveltekit. How to put site on maintenance mode in railway?hello everyone how do i put a site on maintenance mode in railway or 'page can not be reached' mode Service not updating to Hobby specshey! I don't know if I'm doing something wrong but I paid for the hobby plan but my service still haerror on index fileI have an index file in a folder that exports all the components in that folder for easier importinOdoo Community EditionI would like to know if we can setup Odoo in railway? The odoo image is built with docker using thiWebsocket disconnectingHey, I have an app that uses a websocket (hosted on railway) but for some reason every once in a whinpm WARN config production Use `--omit=dev` instead when trying to start Nestjs appI'm trying to deploy my app (https://github.com/Omniforce-Technologies/omniforce-asset-store/tree/deDjangoHello good people of Railway! I would like to ask for a bit of help and advice about Django deployme