The node:path module builds and parses file paths portably across systems: join, resolve, basename, extname, dirname. It avoids concatenating strings by hand and handles each platform's separators.
Example
path.join(import.meta.dirname, 'data', 'users.json');