path module

The built-in Node.js module for joining and splitting file paths in a way that works on every operating system.

In more detail

You import it with import path from "node:path"; the node: prefix marks it as built in. Its types come from the @types/node package.

Example

import path from "node:path"; path.join("src", "index.ts")

Related terms

Taught in

References