Skip to content

resolve breaks Windows UNC Paths #245

Closed

Description

@jaketig

Environment

{
  "pathe": "2.0.3",
  "node": "24.15.0"
}

Reproduction

import path from 'node:path'
import pathe from 'pathe'

export default defineEventHandler((event) => {
  const dir = '\\\\unc-server-name\\unc-path'

  return {
    orig: dir,
    patheResolve: pathe.resolve(dir),
    pathResolve: path.resolve(dir),
  }
})
{
  "orig": "\\\\unc-server-name\\unc-path",
  "patheResolve": "/unc-server-name/unc-path",
  "pathResolve": "\\\\unc-server-name\\unc-path\\"
}

Describe the bug

Apologies if this is intended behaviour, but resolve seems to break windows UNC paths and behaves differently than node:path resolve

Additional context

struggling to get nuxt/image with ipx to read from a windows unc network path

Logs

Activity

  1. added
    bug
    on Jul 8, 2026
  2. added a commit that references this issue on Jul 8, 2026
  3. pi0 commented on Jul 8, 2026

    @pi0
    Member

    thnx for report. since main is prepared for v3, #246 fix will land in v3.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions