Can not deploy my docker suddenly

Mac M1 Max, Sonoma, Wappler 5.8.2

So my production Mac decided it was going to upgrade to Mac OS X Sonoma 3 days ago, and all seemed ok afterwards, I opened my production Wappler and deployed a number of times after making alterations. All working perfectly.

Today for some reason I made a change and tried to deploy and got an error in the output, saying

[+] Building 38.7s (13/13) FINISHED                                                                                                                   
 => [internal] load build definition from Dockerfile                                                                                             0.8s 
 => => transferring dockerfile: 87B                                                                                                              0.6s 
 => [internal] load .dockerignore                                                                                                                0.8s 
 => => transferring context: 89B                                                                                                                 0.6s 
 => [internal] load metadata for docker.io/library/node:16-bullseye-slim                                                                         1.1s
 => [1/9] FROM docker.io/library/node:16-bullseye-slim@sha256:503446c15c6236291222f8192513c2eb56a02a8949cbadf4fe78cce19815c734                   0.0s
 => [internal] load build context                                                                                                                2.1s
 => => transferring context: 1.01MB                                                                                                              2.1s
 => CACHED [2/9] RUN apt-get update; apt-get -y install fontconfig                                                                               0.0s
 => CACHED [3/9] COPY ./fonts /usr/shared/fonts                                                                                                  0.0s
 => CACHED [4/9] COPY ./fonts /usr/share/fonts/truetype                                                                                          0.0s
 => CACHED [5/9] RUN fc-cache -f -v                                                                                                              0.0s
 => CACHED [6/9] RUN mkdir /opt/node_app                                                                                                         0.0s
 => CACHED [7/9] COPY ./ /opt/node_app/                                                                                                          0.0s
 => CACHED [8/9] WORKDIR /opt/node_app                                                                                                           0.0s
 => ERROR [9/9] RUN npm install --no-optional --production --no-package-lock                                                                    34.5s
------
 > [9/9] RUN npm install --no-optional --production --no-package-lock:
#0 0.809 npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or
#0 0.811 npm WARN config `--include=optional` to include them.
#0 0.811 npm WARN config 
#0 0.813 npm WARN config     Default value does install optional deps unless otherwise omitted.
#0 0.813 npm WARN config production Use `--omit=dev` instead.
#0 34.37 npm notice 
#0 34.37 npm notice New major version of npm available! 8.19.4 -> 10.2.1
#0 34.37 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.1>
#0 34.37 npm notice Run `npm install -g npm@10.2.1` to update!
#0 34.37 npm notice 
#0 34.37 npm ERR! code 1
#0 34.37 npm ERR! path /opt/node_app/node_modules/sharp
#0 34.37 npm ERR! command failed
#0 34.37 npm ERR! command sh -c -- (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
#0 34.37 npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.13.3/libvips-8.13.3-linux-x64.tar.br
#0 34.37 npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
#0 34.37 npm ERR! sharp: Installation error: read ECONNRESET
#0 34.38 
#0 34.38 npm ERR! A complete log of this run can be found in:
#0 34.38 npm ERR!     /root/.npm/_logs/2023-10-22T11_46_14_115Z-debug-0.log
------
failed to solve: failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c npm install --no-optional --production --no-package-lock]: runc did not terminate sucessfully
Error Launching Services!

After quitting Wappler and Docker Desktop it was stil doing the same thing, so i rebooted the entire Mac, and then some strange problems began, my external keyboard was not working, nor my external mouse as well as one of my monitors, using the internal keyboard and trackpad i logged in to find some messages asking for permission to allow my external accessories to work, i clicked allow and suddenly the external keyboard, mouse, and monitor all came alive again.

I opened up Wappler 5.8.2 and hit deploy, and i still get the exact same error, anyone got some ideas for me on what to attempt next?

We are seeing same issue here - started this AM and we’re on Windows 64-bit. We believe it’s related to the version of Sharp not being compatible with our Node version. We’re in the middle of trying to find a solution … I suspect we’re going to see everyone hitting this issue.

1 Like

We’re going to upgrade to Node18 and see it it helps. One of the guys is managing to build on his Apple

I have uninstaller xcode command line tools and reinstalled it, still same issue, also tried updating npm install -g npm@10.2.1 which gave an error, also to do with permissions, so i ran it as sudo user and although that worked, it now has more errors on deploy than ever before.

If you uninstall sharp it will work. The issue is you may need sharp

Tried without Sharp, and i am still having issues.

Tried to install the latest npm again and keep getting this.

paul@Pauls-MacBook-Pro ~ % npm install -g npm@10.2.1
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: /Users/paul/.npm/_logs/2023-10-22T12_18_13_856Z-debug-0.log

Have seen a few google results about removing the node_modules folder to clear the error, going to try that next.

1 Like

Did removing it work for you?

Sadly not, when i remove sharp from package.json dependencies list, i get a thousand other errors

 => CACHED [8/9] WORKDIR /opt/node_app                                                                                                           0.0s
 => ERROR [9/9] RUN npm install --no-optional --production --no-package-lock                                                                    34.1s
------                                                                                                                                                
 > [9/9] RUN npm install --no-optional --production --no-package-lock:                                                                                
#0 0.686 npm WARN config optional Use `--omit=optional` to exclude optional dependencies, or                                                          
#0 0.687 npm WARN config `--include=optional` to include them.                                                                                        
#0 0.687 npm WARN config                                                                                                                              
#0 0.687 npm WARN config     Default value does install optional deps unless otherwise omitted.                                                       
#0 0.688 npm WARN config production Use `--omit=dev` instead.
#0 34.05 npm notice 
#0 34.05 npm notice New major version of npm available! 8.19.4 -> 10.2.1
#0 34.05 npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.2.1>
#0 34.05 npm notice Run `npm install -g npm@10.2.1` to update!
#0 34.05 npm notice 
#0 34.06 npm ERR! code 1
#0 34.06 npm ERR! path /opt/node_app/node_modules/argon2
#0 34.06 npm ERR! command failed
#0 34.06 npm ERR! command sh -c -- node-pre-gyp install --fallback-to-build
#0 34.06 npm ERR! Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/node_app/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/opt/node_app/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
#0 34.06 npm ERR! node-pre-gyp info it worked if it ends with ok
#0 34.06 npm ERR! node-pre-gyp info using node-pre-gyp@1.0.11
#0 34.06 npm ERR! node-pre-gyp info using node@16.20.2 | linux | x64
#0 34.06 npm ERR! node-pre-gyp info check checked for "/opt/node_app/node_modules/argon2/lib/binding/napi-v3/argon2.node" (not found)
#0 34.06 npm ERR! node-pre-gyp http GET https://github.com/ranisalt/node-argon2/releases/download/v0.28.7/argon2-v0.28.7-napi-v3-linux-x64-glibc.tar.gz
#0 34.06 npm ERR! node-pre-gyp ERR! install request to https://github.com/ranisalt/node-argon2/releases/download/v0.28.7/argon2-v0.28.7-napi-v3-linux-x64-glibc.tar.gz failed, reason: read ECONNRESET 
#0 34.06 npm ERR! node-pre-gyp WARN Pre-built binaries not installable for argon2@0.28.7 and node@16.20.2 (node-v93 ABI, glibc) (falling back to source compile with node-gyp) 
#0 34.06 npm ERR! node-pre-gyp WARN Hit error request to https://github.com/ranisalt/node-argon2/releases/download/v0.28.7/argon2-v0.28.7-napi-v3-linux-x64-glibc.tar.gz failed, reason: read ECONNRESET 
#0 34.06 npm ERR! gyp info it worked if it ends with ok
#0 34.06 npm ERR! gyp info using node-gyp@9.1.0
#0 34.06 npm ERR! gyp info using node@16.20.2 | linux | x64
#0 34.06 npm ERR! gyp info ok 
#0 34.06 npm ERR! gyp info it worked if it ends with ok
#0 34.06 npm ERR! gyp info using node-gyp@9.1.0
#0 34.06 npm ERR! gyp info using node@16.20.2 | linux | x64
#0 34.06 npm ERR! gyp ERR! find Python 
#0 34.06 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
#0 34.06 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
#0 34.06 npm ERR! gyp ERR! find Python checking if "python3" can be used
#0 34.06 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
#0 34.06 npm ERR! gyp ERR! find Python checking if "python" can be used
#0 34.06 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
#0 34.06 npm ERR! gyp ERR! find Python 
#0 34.06 npm ERR! gyp ERR! find Python **********************************************************
#0 34.06 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
#0 34.06 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#0 34.06 npm ERR! gyp ERR! find Python you can try one of the following options:
#0 34.06 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#0 34.06 npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
#0 34.06 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
#0 34.06 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
#0 34.06 npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#0 34.06 npm ERR! gyp ERR! find Python For more information consult the documentation at:
#0 34.06 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#0 34.06 npm ERR! gyp ERR! find Python **********************************************************
#0 34.06 npm ERR! gyp ERR! find Python 
#0 34.06 npm ERR! gyp ERR! configure error 
#0 34.06 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
#0 34.06 npm ERR! gyp ERR! stack     at PythonFinder.fail (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:330:47)
#0 34.06 npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:159:21)
#0 34.06 npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:202:16)
#0 34.06 npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/find-python.js:294:16)
#0 34.06 npm ERR! gyp ERR! stack     at exithandler (node:child_process:410:5)
#0 34.06 npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:422:5)
#0 34.06 npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#0 34.06 npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
#0 34.06 npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:485:16)
#0 34.06 npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
#0 34.06 npm ERR! gyp ERR! System Linux 5.4.0-144-generic
#0 34.06 npm ERR! gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/node_app/node_modules/argon2/lib/binding/napi-v3/argon2.node" "--module_name=argon2" "--module_path=/opt/node_app/node_modules/argon2/lib/binding/napi-v3" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=3" "--node_napi_label=napi-v3"
#0 34.06 npm ERR! gyp ERR! cwd /opt/node_app/node_modules/argon2
#0 34.06 npm ERR! gyp ERR! node -v v16.20.2
#0 34.06 npm ERR! gyp ERR! node-gyp -v v9.1.0
#0 34.06 npm ERR! gyp ERR! not ok 
#0 34.06 npm ERR! node-pre-gyp ERR! build error 
#0 34.06 npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/node_app/node_modules/argon2/lib/binding/napi-v3/argon2.node --module_name=argon2 --module_path=/opt/node_app/node_modules/argon2/lib/binding/napi-v3 --napi_version=8 --node_abi_napi=napi --napi_build_version=3 --node_napi_label=napi-v3' (1)
#0 34.06 npm ERR! node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/node_app/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
#0 34.06 npm ERR! node-pre-gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#0 34.06 npm ERR! node-pre-gyp ERR! stack     at maybeClose (node:internal/child_process:1100:16)
#0 34.06 npm ERR! node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
#0 34.07 npm ERR! node-pre-gyp ERR! System Linux 5.4.0-144-generic
#0 34.07 npm ERR! node-pre-gyp ERR! command "/usr/local/bin/node" "/opt/node_app/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
#0 34.07 npm ERR! node-pre-gyp ERR! cwd /opt/node_app/node_modules/argon2
#0 34.07 npm ERR! node-pre-gyp ERR! node -v v16.20.2
#0 34.07 npm ERR! node-pre-gyp ERR! node-pre-gyp -v v1.0.11
#0 34.07 npm ERR! node-pre-gyp ERR! not ok
#0 34.07 
#0 34.07 npm ERR! A complete log of this run can be found in:
#0 34.07 npm ERR!     /root/.npm/_logs/2023-10-22T12_41_06_514Z-debug-0.log
------
failed to solve: failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c npm install --no-optional --production --no-package-lock]: runc did not terminate sucessfully
Error Launching Services!

When i put sharp back then i get

paul@Pauls-MacBook-Pro ~ % npm install -g npm@10.2.1
npm ERR! code EACCES
npm ERR! syscall rename
npm ERR! path /usr/local/lib/node_modules/npm
npm ERR! dest /usr/local/lib/node_modules/.npm-i9nnxROI
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR!  [Error: EACCES: permission denied, rename '/usr/local/lib/node_modules/npm' -> '/usr/local/lib/node_modules/.npm-i9nnxROI'] {
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'rename',
npm ERR!   path: '/usr/local/lib/node_modules/npm',
npm ERR!   dest: '/usr/local/lib/node_modules/.npm-i9nnxROI'
npm ERR! }
npm ERR! 
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: /Users/paul/.npm/_logs/2023-10-22T12_18_13_856Z-debug-0.log

Ok well this is strange I just trid to deploy again, without any change at all and sharp included and it worked flawlessly, I honestly do not get it, but it worked.

Could you try put Sharp back too and see if it suddenly just works again.

Doing so now

No, same issue.

Very strange, but thank you for trying, will have to keep an eye on this.

Removed sharp and it’s building again…
annoying but Is suspect there will be a lot of issues tomorrow AM as people start building their projects again after the weekend

I’m experiencing the same issue, it started this morning, i have tried all suggested solutions but no luck

Not working this morning so not sure if this will hit me, but thought I’d share an experience of mine that might help here.

I was having an issue that suddenly crept in during a docker deploy. Long story short, it was a bug in chromium confirmed by their engineers.

But the real issue is that a default docker file only sets the major version of the image rather than full details so when I did a new deploy the alpine version change slightly from its previous and brought with it a new chromium version. The solution was to simply specify the exact alpine (and node for that matter) version and all went back to normal.

So perhaps the sharp package has changed and is causing issues. You could check the versions of your production deployment (assuming that is working) and set that specific version in your dev docker file.

2 Likes

Thankfully all fine here deploying to Digital Ocean using 6.0.0 Beta 12.

I think it was a docker hiccup somehow, I got also the same error about sharp bit deploying 5 minutes later without changing anything, went without any problems…

1 Like

same experience as george - it’s fine again now.

Thankful we were not in a rush to push a live build

Happy that we moved to deploying using CI/CD with @tbvgl 's help, this would be a nightmare of an issue to have when you need to get something to production :open_mouth:

1 Like