NodeJS deployment errors on Digital Ocean

This is a fairly recent issue. Not sure what’s causing it, but my deploys are failing. Anyone else running into this?

=> [1/5] FROM                   0.0s
 => [internal] load build context                                                                                                                0.1s
 => => transferring context: 9.92kB                                                                                                              0.1s
 => CACHED [2/5] RUN mkdir /opt/node_app                                                                                                         0.0s
 => CACHED [3/5] COPY ./ /opt/node_app/                                                                                                          0.0s
 => CACHED [4/5] WORKDIR /opt/node_app                                                                                                           0.0s
 => ERROR [5/5] RUN npm install --no-optional --production --no-package-lock                                                                    38.5s
 > [5/5] RUN npm install --no-optional --production --no-package-lock:
#0 1.891 npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
#0 1.900 npm WARN config `--include=optional` to include them.
#0 1.902 npm WARN config
#0 1.905 npm WARN config     Default value does install optional deps unless otherwise omitted.
#0 1.907 npm WARN config production Use `--omit=dev` instead.
#0 38.16 npm notice 
#0 38.16 npm notice New major version of npm available! 9.8.1 -> 10.1.0
#0 38.16 npm notice Changelog: <>
#0 38.16 npm notice Run `npm install -g npm@10.1.0` to update!
#0 38.16 npm notice 
#0 38.16 npm ERR! code 126
#0 38.16 npm ERR! path /opt/node_app/node_modules/argon2
#0 38.17 npm ERR! command failed
#0 38.17 npm ERR! command sh -c node-pre-gyp install --fallback-to-build
#0 38.17 npm ERR! sh: 1: node-pre-gyp: Text file busy
#0 38.17 
#0 38.18 npm ERR! A complete log of this run can be found in: /root/.npm/_logs/2023-09-23T17_16_53_471Z-debug-0.log
failed to solve: executor failed running [/bin/sh -c npm install --no-optional --production --no-package-lock]: exit code: 126
Error Launching Services!

Seems like it may be a node version issue.

What version are you running Keith? We are using 6.0.0 Beta 8 and experiencing no issues deploying to Digital Ocean.

Same version. I think it’s either a docker version or Ubuntu version issue.

Are you deploying from Windows or Linux?

I’m deploying from Linux Keith.

Hi Keith, I had all sorts of issues when I updated the node version beyond 14 as Argon doesn’t support (or didn’t at that time) Node beyond 14.

My post is Missing packages / unmet dependencies after upgrading to latest version - I didn’t get any support from the team and the error is showing as different to yours other than the Argon 2 mention - but after lots of research it was definitely the Node version that Argon supports that kept causing the errors.

Once I rolled back to a Node version that Argon supports - all was well.

Hope this helps.

Whenever I try to downgrade the remote docker instance from Node 18 to 16 or 14. I get this error.

Ok, node 16 appears to work with argon2.

For some reason node 14 caused 500 connection errors on server connects from my mobile app, so I’ll continue with 16 until whatever issue with 18 is resolved.

Great! Glad I was of some help - i’m running v14.21.3 without issues, but, I’m going to try upgrading to 16 if this is now supported. Thanks!