R
Railway

✋|help

Docker Build Error

Ddayflare8/30/2023
==============

Using Nixpacks

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


context: 009fc5728ee64eb7a597ef6570e251a0

 

╔═════════════ Nixpacks v1.13.0 ═════════════╗

║ setup      │ nodejs-16_x, npm-9_x, openssl ║

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

║ install    │ npm i                         ║

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

║ build      │ CI=false npm run build        ║

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

║ start      │ npm run start                 ║

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

 

 

#0 building with "default" instance using docker driver

 

#1 [internal] load .dockerignore

#1 transferring context: 2B done

#1 DONE 0.1s

 

#2 [internal] load build definition from Dockerfile

 

#2 transferring dockerfile: 2.43kB done

#2 DONE 0.1s

 

#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1690243402

 

#3 DONE 0.3s

 

#4 [stage-0  1/16] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1690243402@sha256:1a7dc562bf1f13299c20e55f8a72a287cb16dfea072fe4d20d084cfe23494afd

#4 DONE 0.0s

 

#5 [internal] load build context

 

#5 transferring context: 1.73MB 0.0s done

#5 DONE 0.1s

 

#6 [stage-0  3/10] COPY .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix

#6 CACHED

 

#7 [stage-0  2/16] WORKDIR /app/

#7 CACHED

 

#8 [stage-0  4/10] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d

 

#8 CACHED

 

#9 [stage-0  5/10] COPY . /app/.

#9 DONE 0.1s

 

 

#10 [stage-0  6/10] RUN --mount=type=cache,id=s/b57dffdc-7fdd-439a-9b87-915525a40fbb-/root/npm,target=/root/.npm npm i

 

#10 1.151 npm

WARN config production Use `--omit=dev` instead.

 

#10 25.99 npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs

 

#10 26.21 npm WARN deprecated har-validator@5.1.5: this library is no longer supported

 

#10 26.28 npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142

 

#10 26.59 npm WARN deprecated signalr-client@0.0.20: This is no longer active

 

#10 26.81 npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

 

#10 26.97 npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142


Anyone know why this is happening?
Bbrody1928/30/2023
Ddayflare8/30/2023
 

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

Using Nixpacks

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


context: 009fc5728ee64eb7a597ef6570e251a0

 

╔═════════════ Nixpacks v1.13.0 ═════════════╗

║ setup      │ nodejs-16_x, npm-9_x, openssl ║

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

║ install    │ npm i                         ║

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

║ build      │ CI=false npm run build        ║

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

║ start      │ npm run start                 ║

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

 

 

#0 building with "default" instance using docker driver

 

#1 [internal] load .dockerignore

#1 transferring context: 2B done

#1 DONE 0.1s

 

#2 [internal] load build definition from Dockerfile

 

#2 transferring dockerfile: 2.43kB done

#2 DONE 0.1s

 

#3 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1690243402

 

#3 DONE 0.3s

 

#4 [stage-0  1/16] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1690243402@sha256:1a7dc562bf1f13299c20e55f8a72a287cb16dfea072fe4d20d084cfe23494afd

#4 DONE 0.0s

 

#5 [internal] load build context

 

#5 transferring context: 1.73MB 0.0s done

#5 DONE 0.1s

 

#6 [stage-0  3/10] COPY .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix

#6 CACHED

 

#7 [stage-0  2/16] WORKDIR /app/

#7 CACHED

 

#8 [stage-0  4/10] RUN nix-env -if .nixpacks/nixpkgs-293a28df6d7ff3dec1e61e37cc4ee6e6c0fb0847.nix && nix-collect-garbage -d

 

#8 CACHED

 

#9 [stage-0  5/10] COPY . /app/.

#9 DONE 0.1s

 

 

#10 [stage-0  6/10] RUN --mount=type=cache,id=s/b57dffdc-7fdd-439a-9b87-915525a40fbb-/root/npm,target=/root/.npm npm i

 

#10 1.151 npm

WARN config production Use `--omit=dev` instead.

 

#10 25.99 npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs

 

#10 26.21 npm WARN deprecated har-validator@5.1.5: this library is no longer supported

 

#10 26.28 npm WARN deprecated request-promise@4.2.6: request-promise has been deprecated because it extends the now deprecated request package, see https://github.com/request/request/issues/3142

 

#10 26.59 npm WARN deprecated signalr-client@0.0.20: This is no longer active

 

#10 26.81 npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

 

#10 26.97 npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

@Brody It doesn't go past the build phase so this is all that gets logged.
Bbrody1928/30/2023
use the bookmarklet and send the resulting file
Ddayflare8/30/2023
The bookmarklet doesn't work.
It just HREF's me straight to the landing page.
Bbrody1928/30/2023
just tested it, works fine, what browser are you using
Ddayflare8/30/2023
Opera GX.
Bbrody1928/30/2023
others have used the bookmarklet without issue on operagx
please follow the 3 steps
please follow the 3 simple steps
Ddayflare8/30/2023
It's in my bookmarks bar.
Bbrody1928/30/2023
the wrong thing is in your bookmark bar, i suggest giving that page a closer read
Ddayflare8/30/2023
Ddayflare8/30/2023
Figured it out but it isn't that clear.
Anyway
Bbrody1928/30/2023
is this a create react app?
Ddayflare8/30/2023
React & NextJS
Ffl1nt.dev8/30/2023
idk if related at all but there is a new incident about builds failing
Ddayflare8/30/2023
I'm not sure it was happening before that appeared.
Bbrody1928/30/2023
its related to this, not the current issue
https://discord.com/channels/713503345364697088/1145794055490506783
i mean yes the current issue too, but the build would fail regardless
Ddayflare8/30/2023
Hmm
Bbrody1928/30/2023
we wait for jr
Ddayflare8/31/2023
Pretty off topic brody, I have these errors coming up now.

When running on my machine, it works perfectly but I don't understand why typescript is overkilling the type checks when its going through to railway.
Ddayflare8/31/2023
In this instance, is not possible for me to edit every session instance as it's handled by NextAuth and edited on a callback when the session is created to include the data the code is requesting.
And they are locked in typesafe checks too, just to ensure the data is actually there.
Not really sure why it's doing this.
@Brody
Bbrody1928/31/2023
hey no need for the pings #🛂|readme #5
my first guess as to why you are seeing different behaver would be different node versions between local and railway
Ddayflare8/31/2023
I think railway is running on a lower version of node>npm as I have seen that pop up in the console.
How do I update that on railways side
Bbrody1928/31/2023
deafult is 16 on railway, what are you using locally?
Ddayflare8/31/2023
v18.14.2
My bad.
Bbrody1928/31/2023
just set engines.node to 18 in your package.json
note, you cant specify minor and patch versions
Ddayflare8/31/2023
Trying now.
Ddayflare8/31/2023
Yeah it's still pushing through this error.
Ddayflare8/31/2023
Bbrody1928/31/2023
is your tsconfig getting gitignored or something?
Ddayflare8/31/2023
# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/
build

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# turbo
.turbo

.contentlayer
.env

Nope.
Bbrody1928/31/2023
then im sorry but i dont really have anymore ideas, but this error is not likely to have only ever appeared in a railway build so feel free to try to do some research around this topic
Ddayflare8/31/2023
Is there a way to check the node version when building it
Ddayflare8/31/2023
Yeah not sure it's updated correctly.
Ddayflare8/31/2023
I'll look elsewhere anyway
Might just be I have to purchase a normal vps and run it on there, not sure if railway just gonna keep yeeting me 💀
Mmedim8/31/2023
Not when building, but u can when u deploy with console.log(process.version);
Ddayflare8/31/2023
There ain't anywhere I can put that as it doesn't get past the building stage.
It keeps crashing.
Mmedim8/31/2023
What's ur next.config.js?
can u paste it here?
Ddayflare8/31/2023
/** @type {import('next').NextConfig} */
const nextConfig = {
  reactStrictMode: false,
  eslint: {
    ignoreDuringBuilds: true
  },
  
  experimental: {
    appDir: true,
    serverActions: true
  },
}

export default nextConfig
Mmedim8/31/2023
What version?
of NextJs
Ddayflare8/31/2023
^13.4.8
Mmedim8/31/2023
typescript: {
    ignoreBuildErrors: true,
  },

add this to ur nextConfig
Ddayflare8/31/2023
aight
Mmedim8/31/2023
like this
/** @type {import('next').NextConfig} */
const nextConfig = {
  ...
  typescript: {
    ignoreBuildErrors: true,
  },
}

export default nextConfig
Ddayflare8/31/2023
building one sec
oh i think its
working now
bruh moment
who know that ignoring typescript would be the answer LOL
Mmedim8/31/2023
just be careful, if it works it indicates that u have some type problems with ur code
https://nextjs.org/docs/pages/api-reference/next-config-js/typescript
Ddayflare8/31/2023
yeah ive looked over and it works perfectly on my machine
im not sure why type checks go overkill on railway
Mmedim8/31/2023
just nextjs things i guess
Bbrody1928/31/2023
CI is set to true
would that have anything to do with it?
Mmedim8/31/2023
I don't think so, just the enviroment
Bbrody1928/31/2023
funky
Mmedim8/31/2023
this happens on builds in prod
Ddayflare8/31/2023
nextjs is v sensitive imo
Mmedim8/31/2023
I guess u can close this thread now lol
Bbrody1928/31/2023
mark as solved*
Ddayflare8/31/2023
idk if i should make another ticket but, does railway provide static ips for mondodb access
Bbrody1928/31/2023
they do not
Ddayflare8/31/2023

is there a way of accessing without actually making another railway project
Bbrody1928/31/2023
is the mongodb in the same project as the service that needs it?
Ddayflare8/31/2023
yeah
rn its accessed via code but
MongoNetworkError: Client network socket disconnected before secure TLS connection was established

at connectionFailureError (/app/node_modules/mongodb/lib/cmap/connect.js:367:20)

at TLSSocket.<anonymous> (/app/node_modules/mongodb/lib/cmap/connect.js:290:22)

at Object.onceWrapper (node:events:628:26)

at TLSSocket.emit (node:events:513:28)

at emitErrorNT (node:internal/streams/destroy:151:8)

at emitErrorCloseNT (node:internal/streams/destroy:116:3)

at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {

cause: Error: Client network socket disconnected before secure TLS connection was established

at connResetException (node:internal/errors:711:14)

at TLSSocket.onConnectEnd (node:_tls_wrap:1593:19)

at TLSSocket.emit (node:events:525:35)

at endReadableNT (node:internal/streams/readable:1359:12)

at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {

code: 'ECONNRESET',

path: undefined,

host: 'ac-msxrvi3-lb.boph4ie.mongodb.net',

port: 27017,

localAddress: undefined

},

connectionGeneration: 0,

[Symbol(errorLabels)]: Set(0) {}

}

getting these errors cause
railway isnt whitelisted onto my db
Bbrody1928/31/2023
this is not a railway mongo database
i had just asked if the database was in the project, please do your best to provide correct information
but you would need to whitelist all ips with either a wildcard or 0.0.0.0/0
Ddayflare8/31/2023
that would pose a huge security issue
Bbrody1928/31/2023
not really, railway's databases do not have ip whitelisting
Ddayflare8/31/2023
for mongo, if i whitelist any ip it would mean anyone with a user/password could have access
Bbrody1928/31/2023
do you plan on handing that out?
probably not, so you will be fine
dont put anything sensitive into a .env file, even a local .env file, and you wont have issues
store the secrets in the service variables and use the railway cli to run your app locally with the variables from the service
https://docs.railway.app/develop/cli#local-shell
Ddayflare8/31/2023
i disabled ip checking anyway
its working other than none of my icons from the public folder are loading
Ddayflare8/31/2023
Ddayflare8/31/2023
ill figure that out somehow anyways
Bbrody1928/31/2023
sounds good
Ddayflare8/31/2023
oml
i just bought a domain with google domains to find out railway isnt compatible
as you cant root cname records with gdomains
and railway doesnt give nameservers
is there a way around this
Bbrody1928/31/2023
use cloudflares nameservers
Ddayflare8/31/2023
ive already registered with google domains tho
and it wont let me transfer it to cloudflare
Bbrody1928/31/2023
you don't need to transfer, just use their nameservers

Looking for more? Join the community!

Recommended Posts
making linux program available in nixpacksHi, I want to run a golang app on railway. Within this app i use the following dependency https://giIs it normal for a deployment to be initializing this long?https://cdn.fl1nt.dev/GAGE1/YAdogAtO61.png I don't think this is normal, none of my deployments takUpdating N8N Service Via Railway CLIHello, I created a Railway project and installed N8N via a Railway template. The version I am on is Ephemeral storage concernHi I want to do programmatic NPM publishes using a Railway service I will need to basically use shelredploy after pushin to github not working anymoreit stopped to redeploy my appProject failing to deploy - 'no space available'Project: 13b3222b-eb44-433c-ad71-9174aa430a7d Has been deploying fine but started to complain about"Waiting" to deploy for 18 hours? Am I doing something wrong?I'm trying to move an app I deployed personally to a new account by setting up a new account and newQ: Help with Deploying a Medusa Server to RailwaySo, it keeps saying server crashed, but in the logs, nothing seems to be an issue. Been at it backHow do i move my project under the pro plan i just moved to?I just migrated from hobby to Pro - how do i move my projects under this? it says i need an active sDeploy appwrite on railway apphow to deploy appwrite in railway app ? , as fullstack i really like appwrite as backend and Next jsCurrent usage is $ 3.13 but current bill $5.00Please let me know how it's works, should I pay $5 for next month Project: af5712a6-cd8f-4b70-93f8-1Cannot create code snapshot right nowCannot create code snapshot right now, please review your last commit or try again If this error perrailway mediasoup portsHello, can I run mediasoup on railway? I have this errors when I try to run it. ``` Error: port binrailway cache not clearing despite NIXPACKS_NO_CACHEas title says. my railway server is not deploying without using cache.Security Page for RailwayDoes Railway have a privacy/security page that we could reference to fulfill requirements from custoBig memory usageI have a nodejs app running some tasks and it seems like the ram is increadibly high in the railway Cannot terminate old instanceI have an old instance running alongside the latest one, and I cannot find a way to terminate it thrGitHub deployment triggers became inactiveDeployment trigger to main branch became inactive, I am on a paid plan.no build errors but serve command keeps crashingHi, I’m new to nx workspace, nest and railways.app. I did some changes and I pushed them to my GitHTemplate variable function ${{ secret() }} broken for new template deploysHey, I have a plausible analytics template on railway. I just got an issue on my GitHub repo for the