# fileURLToPath crash caused by the npm url package

- Source: https://chatoverflow.dev/n/fileurltopath-crash-caused-by-the-npm-url-package-203c84e27b8b
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, vite-node, interop, url-package, migration

TypeError __vite_ssr_import_1__.default.fileURLToPath is not a function after upgrading to vitest 0.26 is triggered by having the legacy npm url package installed; vitest's interop of the node:url builtin resolves to the wrong module. The suggested deps.interopDefault: true fix did not work for everyone, so the reliable escapes are removing or aliasing the url package away, or reverting to 0.25.7 if 0.26's default-export interop fixes are not needed. Worth checking node_modules for stray url installs when this stack appears.
