Skip to content

fix: drop .zip deployment - isDate is not a function#4129

Open
NomisCZ wants to merge 2 commits intoDokploy:canaryfrom
NomisCZ:fix/ssh2-isdate-nodejs23
Open

fix: drop .zip deployment - isDate is not a function#4129
NomisCZ wants to merge 2 commits intoDokploy:canaryfrom
NomisCZ:fix/ssh2-isdate-nodejs23

Conversation

@NomisCZ
Copy link
Copy Markdown

@NomisCZ NomisCZ commented Apr 2, 2026

What is this PR about?

Summary:

Fix TypeError: isDate is not a function in Drop Deployment by upgrading ssh2 from 1.15.0 to ^1.16.0, which replaces the removed util.isDate with util.types.isDate for Node.js v23+ compatibility.

Description:

ssh2@1.15.0 imports isDate directly from Node.js's util module. However, isDate was deprecated and removed in Node.js v23+.

const { inherits, isDate } = require('util');

ssh2 commit: mscdex/ssh2@4f771c9

Dokploy now requires "node": "^24.4.0", which means util.isDate destructures as undefined at runtime. When the bundled code calls isDate(attrs.atime) during an SFTP file upload, it throws:

TypeError: isDate is not a function
    at <unknown> (.next/server/chunks/1568.js:1022:19071)
    at new Promise (<anonymous>)

Called API endpoint: /api/trpc/application.dropDeployment:

{
    "error": {
        "json": {
            "message": "isDate is not a function",
            "code": -32603,
            "data": {
                "code": "INTERNAL_SERVER_ERROR",
                "httpStatus": 500,
                "path": "application.dropDeployment",
                "zodError": null
            }
        }
    }
}

This breaks the Drop Deployment feature — every file upload via SFTP fails with HTTP 500.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Screenshots (if applicable)

image

Greptile Summary

This PR fixes a runtime crash in the Drop Deployment (.zip upload) feature by upgrading ssh2 from 1.15.0 to ^1.16.0 (resolves to 1.17.0 in the lockfile). The root cause is that Node.js v23+ removed util.isDate, which ssh2@1.15.0 destructures directly from require('util'). Since Dokploy now requires Node.js ^24.4.0, this caused every SFTP file upload to throw TypeError: isDate is not a function and return HTTP 500. The upgrade to ssh2@1.17.0 uses util.types.isDate instead, restoring compatibility.

Key changes:

  • packages/server/package.json: ssh2 bumped from pinned 1.15.0 to ^1.16.0
  • pnpm-lock.yaml: Resolves ssh2 to 1.17.0 and includes expected collateral lockfile changes (peer-dependency hash updates for better-auth, jiti minor resolution shifts for dev/test tooling). None of these collateral changes affect production runtime behavior.

Confidence Score: 5/5

This PR is safe to merge — it is a minimal, well-scoped dependency bump that directly addresses a confirmed production crash on Node.js v23+.

The fix is precise and well-justified: ssh2@1.17.0 contains the exact upstream commit that replaces the removed util.isDate with util.types.isDate. The change is isolated to one dependency. The collateral lockfile changes (better-auth hash updates, jiti version swaps in dev/test tooling snapshots) are normal artifacts of lockfile regeneration and carry no production risk. No breaking changes are introduced by the ssh2 minor version upgrade.

No files require special attention.

Reviews (1): Last reviewed commit: "fix: upgrade ssh2 from 1.15.0 to ^1.16.0..." | Re-trigger Greptile

(2/5) Greptile learns from your feedback when you react with thumbs up/down!

@NomisCZ NomisCZ requested a review from Siumauricio as a code owner April 2, 2026 23:43
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Apr 2, 2026
@Siumauricio
Copy link
Copy Markdown
Contributor

Check the build errors @NomisCZ

@NomisCZ
Copy link
Copy Markdown
Author

NomisCZ commented Apr 17, 2026

@Siumauricio Any updates?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants