Resolve the entry for both on-disk checks and import. Node allows main to omit the file
extension. Directory entries use their own main or index file. Keep the declared path when
neither resolves so the caller can report it as missing or unimportable.
Resolve the entry for both on-disk checks and import. Node allows
mainto omit the file extension. Directory entries use their own main or index file. Keep the declared path when neither resolves so the caller can report it as missing or unimportable.