I don't know if my setup is the problem but I get this error from my nest project.
If I change the imports to: import { PathLike } from 'node:fs'; and replace all fs.PathLike with PathLike it works.
https://github.com/typicode/lowdb/blob/main/src/adapters/node/TextFile.ts#L1
https://github.com/typicode/lowdb/blob/main/src/presets/node.ts#L1
If this is not a valid issue and my setup is the problem, please let me know - first time working with typescript.