realpath-missing
realpath-missingresolves the absolute path of a file or directory by following every symbolic link in every component of the given name recursively, even if some of the components do not exist.
Installation
<npm|yarn|pnpm> add realpath-missing
Usage
'use strict'
const realpathMissing = require('realpath-missing')
console.log(await realpathMissing('package.json'))
//> /home/src/package.json