New deploy of node app doesn't respect engine specified in package.json

lexwebb
HOBBY

8 months ago

I'm new to railway an I'm trying to deploy a node app. I'm not using nixpacks just manual project settings. My project requires at minimum node v20. I've tried setting the node engine to many variations and i'm still getting an warning.

I can tell it's not using the specified version as i'm trying to import the global 'crypto' but it's failing, indicating its forcing node18

Here is my latest attempt

  "engines": {

    "node": "22"

  },

WARN  Unsupported engine: wanted: {"node":"22"} (current: {"node":"v18.20.2","pnpm":"9.0.2"})

Solved

1 Replies

lexwebb
HOBBY

8 months ago

I have figured it out. I'm working in a pnpm monorepo. It appears railway might be pulling the engine from the first package.json file it sees, not the root. I've changed them all to match and it works now.


Status changed to Solved brody 8 months ago