Problem that only occurs on Railway
antonioandredev
HOBBYOP

a year ago

I'm trying to upload my backend to Railway but it's giving me an error: /app/node_modules/@nestjs/typeorm/dist/common/typeorm.utils.js:123

const generateString = () => crypto.randomUUID();

                         ReferenceError: crypto is not defined

But this error only occurs in Railway, when I run the build and then run the application after the build, no error occurs.

View Deploy details

ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

2 Replies

a year ago

Hello,

In your package.json set your engines.node to 20


brody

Hello, In your package.json set your `engines.node` to `20`

antonioandredev
HOBBYOP

a year ago

This worked! Thank you very much


Status changed to Solved brody over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...