Unmable to build basic Node project

drummersiTRIAL

5 months ago

Trying to build my project from Github - It seems it's missing a native binary on your version of linux .. Can you provide any dertails or workarounds for this.. Included is my build log:

13 0.676 Require stack:

13 0.676 - /app/node_modules/@swc/core/binding.js

13 0.676 - /app/node_modules/@swc/core/index.js

13 0.676 - /app/node_modules/ts-node-maintained/dist/transpilers/swc.js

13 0.676 - /app/node_modules/ts-node-maintained/dist/index.js

13 0.676 - /app/node_modules/ts-node-maintained/dist/esm.js

13 0.676 - /app/node_modules/ts-node-maintained/esm.mjs

13 0.676 at Function. (node:internal/modules/cjs/loader:1249:15)

13 0.676 at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue as _resolveFilename

13 0.676 at Function._load (node:internal/modules/cjs/loader:1075:27)

13 0.676 at TracingChannel.traceSync (node:diagnostics_channel:315:14)

13 0.676 at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)

13 0.676 at Module.require (node:internal/modules/cjs/loader:1340:12)

13 0.676 at require (node:internal/modules/helpers:141:16)

13 0.676 at requireNative (/app/node_modules/@swc/core/binding.js:211:18)

13 0.676 at Object. (/app/node_modules/@swc/core/binding.js:302:17)

13 0.676 at Module._compile (node:internal/modules/cjs/loader:1546:14),

13 0.676 Error: Cannot find module '@swc/core-linux-x64-gnu'

13 0.676 Require stack:

13 0.676 - /app/node_modules/@swc/core/binding.js

13 0.676 - /app/node_modules/@swc/core/index.js

13 0.676 - /app/node_modules/ts-node-maintained/dist/transpilers/swc.js

13 0.676 - /app/node_modules/ts-node-maintained/dist/index.js

13 0.676 - /app/node_modules/ts-node-maintained/dist/esm.js

13 0.676 - /app/node_modules/ts-node-maintained/esm.mjs

13 0.676 at Function. (node:internal/modules/cjs/loader:1249:15)

13 0.676 at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue as _resolveFilename

13 0.676 at Function._load (node:internal/modules/cjs/loader:1075:27)

13 0.676 at TracingChannel.traceSync (node:diagnostics_channel:315:14)

13 0.676 at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)

13 0.676 at Module.require (node:internal/modules/cjs/loader:1340:12)

13 0.676 at require (node:internal/modules/helpers:141:16)

13 0.676 at requireNative (/app/node_modules/@swc/core/binding.js:216:18)

13 0.676 at Object. (/app/node_modules/@swc/core/binding.js:302:17)

13 0.676 at Module._compile (node:internal/modules/cjs/loader:1546:14)

13 0.676 ]

13 0.676 }

13 0.676

13 0.676 Node.js v22.10.0

13 ERROR: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 1

> [stage-0 9/11] RUN --mount=type=cache,id=s/0176b860-1217-4cf5-84c8-e01f85361394-nodemodules/cache,target=/app/nodemodules/.cache npm run build:

0.676 at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)

0.676 at Module.require (node:internal/modules/cjs/loader:1340:12)

0.676 at require (node:internal/modules/helpers:141:16)

0.676 at requireNative (/app/node_modules/@swc/core/binding.js:216:18)

0.676 at Object. (/app/node_modules/@swc/core/binding.js:302:17)

0.676 at Module._compile (node:internal/modules/cjs/loader:1546:14)

0.676 ]

0.676 }

0.676

0.676 Node.js v22.10.0

Dockerfile:25

23 | # build phase

24 | COPY . /app/.

25 | >>> RUN --mount=type=cache,id=s/0176b860-1217-4cf5-84c8-e01f85361394-nodemodules/cache,target=/app/nodemodules/.cache npm run build

26 |

27 |

ERROR: failed to solve: process "/bin/bash -ol pipefail -c npm run build" did not complete successfully: exit code: 1

Error: Docker build failed

View Deploy details

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

1 Replies

5 months ago

Hello,

Looks like you have got the deploy online, now you are facing the 502 error, for that please see this docs section -

https://docs.railway.com/reference/errors/application-failed-to-respond


Unmable to build basic Node project - Railway Help Station