How do I resolve a relative include in a javascript executable?

I have file called node_modules/.bin/openapi. I’m trying to figure out

  • where the source is for that.
  • and what package calls it.

When I open that file, there is one line for it.

require('../lib/index');

But there is no file node_modules/lib/index*. How can I resolve what npx openapi is pointing to?