R
Railway15mo ago
dayflare

Docker Build Error

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

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/[email protected]: This functionality has been moved to @npmcli/fs



#10 26.21 npm WARN deprecated [email protected]: this library is no longer supported



#10 26.28 npm WARN deprecated [email protected]: 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 [email protected]: This is no longer active



#10 26.81 npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
==============

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/[email protected]: This functionality has been moved to @npmcli/fs



#10 26.21 npm WARN deprecated [email protected]: this library is no longer supported



#10 26.28 npm WARN deprecated [email protected]: 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 [email protected]: This is no longer active



#10 26.81 npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
Anyone know why this is happening?
75 Replies
Percy
Percy15mo ago
Project ID: b57dffdc-7fdd-439a-9b87-915525a40fbb
Brody
Brody15mo ago
dayflare
dayflare15mo ago


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

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/[email protected]: This functionality has been moved to @npmcli/fs



#10 26.21 npm WARN deprecated [email protected]: this library is no longer supported



#10 26.28 npm WARN deprecated [email protected]: 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 [email protected]: This is no longer active



#10 26.81 npm WARN deprecated [email protected]: 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 [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142


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

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/[email protected]: This functionality has been moved to @npmcli/fs



#10 26.21 npm WARN deprecated [email protected]: this library is no longer supported



#10 26.28 npm WARN deprecated [email protected]: 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 [email protected]: This is no longer active



#10 26.81 npm WARN deprecated [email protected]: 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 [email protected]: 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.
Brody
Brody15mo ago
use the bookmarklet and send the resulting file
dayflare
dayflare15mo ago
The bookmarklet doesn't work. It just HREF's me straight to the landing page.
Brody
Brody15mo ago
just tested it, works fine, what browser are you using
dayflare
dayflare15mo ago
Opera GX.
Brody
Brody15mo ago
others have used the bookmarklet without issue on operagx please follow the 3 steps please follow the 3 simple steps
dayflare
dayflare15mo ago
It's in my bookmarks bar.
Brody
Brody15mo ago
the wrong thing is in your bookmark bar, i suggest giving that page a closer read
dayflare
dayflare15mo ago
Figured it out but it isn't that clear. Anyway
Brody
Brody15mo ago
is this a create react app?
dayflare
dayflare15mo ago
React & NextJS
Flint
Flint15mo ago
idk if related at all but there is a new incident about builds failing
dayflare
dayflare15mo ago
I'm not sure it was happening before that appeared.
Flint
Flint15mo ago
A percentage of builds are failing to go through – Incident details...
A percentage of builds are failing to go through – Incident details - Railway Status
Brody
Brody15mo ago
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
dayflare
dayflare15mo ago
Hmm
Brody
Brody15mo ago
we wait for jr
dayflare
dayflare15mo ago
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.
No description
dayflare
dayflare15mo ago
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
Brody
Brody15mo ago
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
dayflare
dayflare15mo ago
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
Brody
Brody15mo ago
deafult is 16 on railway, what are you using locally?
dayflare
dayflare15mo ago
v18.14.2 My bad.
Brody
Brody15mo ago
just set engines.node to 18 in your package.json note, you cant specify minor and patch versions
dayflare
dayflare15mo ago
Trying now.
dayflare
dayflare15mo ago
Yeah it's still pushing through this error.
No description
Brody
Brody15mo ago
is your tsconfig getting gitignored or something?
dayflare
dayflare15mo ago
# 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
# 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.
Brody
Brody15mo ago
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
dayflare
dayflare15mo ago
Is there a way to check the node version when building it
dayflare
dayflare15mo ago
Yeah not sure it's updated correctly.
No description
dayflare
dayflare15mo ago
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 💀
Medim
Medim15mo ago
Not when building, but u can when u deploy with console.log(process.version);
dayflare
dayflare15mo ago
There ain't anywhere I can put that as it doesn't get past the building stage. It keeps crashing.
Medim
Medim15mo ago
What's ur next.config.js? can u paste it here?
dayflare
dayflare15mo ago
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
eslint: {
ignoreDuringBuilds: true
},

experimental: {
appDir: true,
serverActions: true
},
}

export default nextConfig
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: false,
eslint: {
ignoreDuringBuilds: true
},

experimental: {
appDir: true,
serverActions: true
},
}

export default nextConfig
Medim
Medim15mo ago
What version? of NextJs
dayflare
dayflare15mo ago
^13.4.8
Medim
Medim15mo ago
typescript: {
ignoreBuildErrors: true,
},
typescript: {
ignoreBuildErrors: true,
},
add this to ur nextConfig
dayflare
dayflare15mo ago
aight
Medim
Medim15mo ago
like this
/** @type {import('next').NextConfig} */
const nextConfig = {
...
typescript: {
ignoreBuildErrors: true,
},
}

export default nextConfig
/** @type {import('next').NextConfig} */
const nextConfig = {
...
typescript: {
ignoreBuildErrors: true,
},
}

export default nextConfig
dayflare
dayflare15mo ago
building one sec oh i think its working now bruh moment who know that ignoring typescript would be the answer LOL
Medim
Medim15mo ago
just be careful, if it works it indicates that u have some type problems with ur code
Medim
Medim15mo ago
next.config.js Options: typescript
Next.js reports TypeScript errors by default. Learn to opt-out of this behavior here.
dayflare
dayflare15mo ago
yeah ive looked over and it works perfectly on my machine im not sure why type checks go overkill on railway
Medim
Medim15mo ago
just nextjs things i guess
Brody
Brody15mo ago
CI is set to true would that have anything to do with it?
Medim
Medim15mo ago
I don't think so, just the enviroment
Brody
Brody15mo ago
funky
Medim
Medim15mo ago
this happens on builds in prod
dayflare
dayflare15mo ago
nextjs is v sensitive imo
Medim
Medim15mo ago
I guess u can close this thread now lol
Brody
Brody15mo ago
mark as solved*
dayflare
dayflare15mo ago
idk if i should make another ticket but, does railway provide static ips for mondodb access
Brody
Brody15mo ago
they do not
dayflare
dayflare15mo ago
is there a way of accessing without actually making another railway project
Brody
Brody15mo ago
is the mongodb in the same project as the service that needs it?
dayflare
dayflare15mo ago
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) {}

}
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
Brody
Brody15mo ago
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
dayflare
dayflare15mo ago
that would pose a huge security issue
Brody
Brody15mo ago
not really, railway's databases do not have ip whitelisting
dayflare
dayflare15mo ago
for mongo, if i whitelist any ip it would mean anyone with a user/password could have access
Brody
Brody15mo ago
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
dayflare
dayflare15mo ago
i disabled ip checking anyway its working other than none of my icons from the public folder are loading
dayflare
dayflare15mo ago
No description
dayflare
dayflare15mo ago
ill figure that out somehow anyways
Brody
Brody15mo ago
sounds good
dayflare
dayflare15mo ago
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
Brody
Brody15mo ago
use cloudflares nameservers
dayflare
dayflare15mo ago
ive already registered with google domains tho and it wont let me transfer it to cloudflare
Brody
Brody15mo ago
you don't need to transfer, just use their nameservers
Want results from more Discord servers?
Add your server