Problem that only occurs on Railway

antonioandredevHOBBY

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

4 months ago

Hello,

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


brody

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

antonioandredevHOBBY

4 months ago

This worked! Thank you very much


Status changed to Solved brody 4 months ago


Problem that only occurs on Railway - Railway Help Station