crypto builtin node module not found
shopgoodwill-sniper
HOBBYOP

a year ago

hello, we are getting crypto builtin node module not found error on our railway hosted managed node app, how do we fix it I tried installing the npm install crypto as well and that didn't fix the issue either how do I fix it?

Solved

4 Replies

We recommend that you set engines.node in packages.json to the same node version you are using in your development environment.


Status changed to Awaiting User Response Railway 12 months ago


christian

We recommend that you set engines.node in packages.json to the same node version you are using in your development environment.

vehpus
FREE

a year ago

We're encountering a similar issue in our deployment, and setting engines.node (or .nvmrc) doesn't seem to have an effect. I still see that nixpacks installs version 18:

```

[Region: us-west1]

==============

Using Nixpacks

==============

context: d2c4-HMzV

╔══════════════════════════════ Nixpacks v1.34.1 ══════════════════════════════╗

║ setup      │ nodejs_18, npm-9_x, libnss3, libatk1.0-0, libatk-bridge2.0-0,   ║

║            │ libcups2, libgbm1, libasound2, libpangocairo-1.0-0, libxss1,    ║

║            │ libgtk-3-0, libxshmfence1, libglu1                              ║

║──────────────────────────────────────────────────────────────────────────────║

║ install    │ npm ci                                                          ║

║──────────────────────────────────────────────────────────────────────────────║

║ build      │ npm run build --prefix apps/backend                             ║

║──────────────────────────────────────────────────────────────────────────────║

║ start      │ npm run start --prefix apps/backend                             ║

╚══════════════════════════════════════════════════════════════════════════════╝

...

npm warn EBADENGINE Unsupported engine {

npm warn EBADENGINE   package: undefined,

npm warn EBADENGINE   required: { node: '>=23', npm: '>=10' },

npm warn EBADENGINE   current: { node: 'v18.20.5', npm: '10.8.2' }

npm warn EBADENGINE }

npm warn EBADENGINE Unsupported engine {

npm warn EBADENGINE   package: 'epitaphs-backend@0.0.1',

npm warn EBADENGINE   required: { node: '>=23', npm: '>=10' },

npm warn EBADENGINE   current: { node: 'v18.20.5', npm: '10.8.2' }

npm warn EBADENGINE }

npm warn EBADENGINE Unsupported engine {

npm warn EBADENGINE   package: 'epitaphs-backend@0.0.1',

npm warn EBADENGINE   required: { node: '>=23', npm: '>=10' },

npm warn EBADENGINE   current: { node: 'v18.20.5', npm: '10.8.2' }

npm warn EBADENGINE }

...

=== Successfully Built! ===

Run:

docker run -it us-west1.registry.rlwy.net/04ee03be-4dcb-4b39-97fd-febce0db21dd:487b7adf-77c3-4e1a-a215-3c3ebe114187

Build time: 52.36 seconds
```


Status changed to Awaiting Railway Response Railway 11 months ago


vehpus

We're encountering a similar issue in our deployment, and setting engines.node (or .nvmrc) doesn't seem to have an effect. I still see that nixpacks installs version 18:```[Region: us-west1]==============Using Nixpacks==============context: d2c4-HMzV╔══════════════════════════════ Nixpacks v1.34.1 ══════════════════════════════╗║ setup      │ nodejs_18, npm-9_x, libnss3, libatk1.0-0, libatk-bridge2.0-0,   ║║            │ libcups2, libgbm1, libasound2, libpangocairo-1.0-0, libxss1,    ║║            │ libgtk-3-0, libxshmfence1, libglu1                              ║║──────────────────────────────────────────────────────────────────────────────║║ install    │ npm ci                                                          ║║──────────────────────────────────────────────────────────────────────────────║║ build      │ npm run build --prefix apps/backend                             ║║──────────────────────────────────────────────────────────────────────────────║║ start      │ npm run start --prefix apps/backend                             ║╚══════════════════════════════════════════════════════════════════════════════╝...npm warn EBADENGINE Unsupported engine {npm warn EBADENGINE   package: undefined,npm warn EBADENGINE   required: { node: '>=23', npm: '>=10' },npm warn EBADENGINE   current: { node: 'v18.20.5', npm: '10.8.2' }npm warn EBADENGINE }npm warn EBADENGINE Unsupported engine {npm warn EBADENGINE   package: 'epitaphs-backend@0.0.1',npm warn EBADENGINE   required: { node: '>=23', npm: '>=10' },npm warn EBADENGINE   current: { node: 'v18.20.5', npm: '10.8.2' }npm warn EBADENGINE }npm warn EBADENGINE Unsupported engine {npm warn EBADENGINE   package: 'epitaphs-backend@0.0.1',npm warn EBADENGINE   required: { node: '>=23', npm: '>=10' },npm warn EBADENGINE   current: { node: 'v18.20.5', npm: '10.8.2' }npm warn EBADENGINE }...=== Successfully Built! ===Run:docker run -it us-west1.registry.rlwy.net/04ee03be-4dcb-4b39-97fd-febce0db21dd:487b7adf-77c3-4e1a-a215-3c3ebe114187Build time: 52.36 seconds```

vehpus
FREE

a year ago

Switching to Railpack helped


I'd recommend using Railpack moving forward - we've fixed a lot of Nixpacks issues in Railpack and improved version detection throughout.

(Going to close this out, feel free to reopen if needed!)


Status changed to Awaiting User Response Railway 11 months ago


Status changed to Solved ray-chen 11 months ago


Loading...