Error code

Node.js ERR_INVALID_FILE_URL_PATH

NODE.JSERR_INVALID_FILE_URL_PATH
Runtime Error Code· An error code from a programming runtime or package manager, like Node.js or npm.

What it means

A file: URL has a path that is invalid on the current operating system.

How to fix it

  1. Construct file: URLs using the pathToFileURL utility from node:url.
  2. Avoid hand-crafting file: URLs with platform-specific path separators.

Not affiliated with Node.js. Answer summarized from the manufacturer's manual linked above; consult that source for the authoritative procedure.