Local development: functions is unhealthy, UNABLE_TO_VERIFY_LEAF_SIGNATURE
I'm not sure why, but the functions container is unhealthy now.
$ nhost up
Checking versions...
✅ Auth is already on a recommended version: 0.49.1
✅ Storage is already on a recommended version: 0.14.0
✅ PostgreSQL is already on a recommended version: 14.20-20251217-1
✅ Hasura is already on a recommended version: v2.48.10-ce
✅ Nhost CLI 1.51.1 for linux-amd64 is already on the latest version
Setting up Nhost development environment...
Starting Nhost development environment...
[+] Running 11/12
⠿ Network my-project_default Created 0.1s
⠿ Container my-project-configserver-1 Healthy 18.5s
⠿ Container my-project-functions-1 Waiting 27.8s
⠿ Container my-project-dashboard-1 Healthy 18.5s
⠿ Container my-project-mailhog-1 Healthy 18.3s
⠿ Container my-project-postgres-1 Healthy 18.5s
⠿ Container my-project-traefik-1 Healthy 18.5s
⠿ Container my-project-minio-1 Healthy 18.2s
⠿ Container my-project-graphql-1 Healthy 17.5s
⠿ Container my-project-console-1 Healthy 27.0s
⠿ Container my-project-storage-1 Healthy 17.4s
⠿ Container my-project-auth-1 Healthy 22.5s
container for service "functions" is unhealthy
failed to start Nhost development environment: failed to start docker compose: exit status 1
- Do you want to stop Nhost's development environment? [y/N]$ docker logs my-project-functions-1
Node.js v24.19.0
/nix/store/2381p229a5w3zgfgk9bgf4vq1ravqyla-nodejs-slim-24.19.0-corepack/lib/node_modules/corepack/dist/lib/corepack.cjs:12951
throw new Error(
^
Error: Error when performing the request to https://registry.yarnpkg.com/yarn/-/yarn-1.22.22.tgz; for troubleshooting help, see https://github.com/nodejs/corepack#troubleshooting
at fetch (/nix/store/2381p229a5w3zgfgk9bgf4vq1ravqyla-nodejs-slim-24.19.0-corepack/lib/node_modules/corepack/dist/lib/corepack.cjs:12951:11)
at process.processTicksAndRejections (node:internal/process/task_queues:104:5)
at async fetchUrlStream (/nix/store/2381p229a5w3zgfgk9bgf4vq1ravqyla-nodejs-slim-24.19.0-corepack/lib/node_modules/corepack/dist/lib/corepack.cjs:12981:20)
at async download (/nix/store/2381p229a5w3zgfgk9bgf4vq1ravqyla-nodejs-slim-24.19.0-corepack/lib/node_modules/corepack/dist/lib/corepack.cjs:13133:18)
at async installVersion (/nix/store/2381p229a5w3zgfgk9bgf4vq1ravqyla-nodejs-slim-24.19.0-corepack/lib/node_modules/corepack/dist/lib/corepack.cjs:13229:55)
at async Engine.ensurePackageManager (/nix/store/2381p229a5w3zgfgk9bgf4vq1ravqyla-nodejs-slim-24.19.0-corepack/lib/node_modules/corepack/dist/lib/corepack.cjs:13744:32)
at async Engine.executePackageManagerRequest (/nix/store/2381p229a5w3zgfgk9bgf4vq1ravqyla-nodejs-slim-24.19.0-corepack/lib/node_modules/corepack/dist/lib/corepack.cjs:13855:25)
at async Object.runMain (/nix/store/2381p229a5w3zgfgk9bgf4vq1ravqyla-nodejs-slim-24.19.0-corepack/lib/node_modules/corepack/dist/lib/corepack.cjs:14566:7) {
[cause]: [TypeError: fetch failed] {
[cause]: Error: unable to verify the first certificate; if the root CA is installed locally, try running Node.js with --use-system-ca
at TLSSocket.onConnectSecure (node:internal/tls/wrap:1768:34)
at TLSSocket.emit (node:events:509:28)
at TLSSocket._finishInit (node:internal/tls/wrap:1203:8)
at ssl.onhandshakedone (node:internal/tls/wrap:984:12) {
code: 'UNABLE_TO_VERIFY_LEAF_SIGNATURE'
}
}
}
Node.js v24.19.0The certificate looks like it's okay, maybe?
$ openssl s_client -connect localhost:443 -servername local.auth.local.nhost.run </dev/null 2>/dev/null | openssl x509 -noout -subject -issuer -dates -fingerprint -ext subjectAltName
subject=CN = *.ai.local.nhost.run
issuer=C = US, O = Let's Encrypt, CN = YE1
notBefore=Sep 3 07:18:46 2026 GMT
notAfter=Dec 2 07:18:45 2026 GMT
SHA1 Fingerprint=03:54:1D:03:CB:5F:07:FD:67:D8:DC:AF:23:81:07:E8:52:8D:D4:A6
X509v3 Subject Alternative Name:
DNS:*.ai.local.nhost.run, DNS:*.auth.local.nhost.run, DNS:*.dashboard.local.nhost.run, DNS:*.db.local.nhost.run, DNS:*.functions.local.nhost.run, DNS:*.graphql.local.nhost.run, DNS:*.hasura.local.nhost.run, DNS:*.mailhog.local.nhost.run, DNS:*.storage.local.nhost.runPreviously I was having an issue with node dependencies not working: the function logs had messages like The Yarn Plug'n'Play manifest forbids importing "jsonwebtoken" here because it's not listed as a dependency of this package:
I had jsonwebtoken installed in the projects node_modules, but I couldn't cd functions and npm install jsonwebtoken, because I was getting a permission error. ./functions/node_modules was owned by root with read-only access.
I'm using yarn in the main repository, so I deleted package-lock.json and chown $(whoami) functions/node_modules .
What's going on? Do I need to reinstall nhost? How do I do that?
Source: nhost/nhost