improving the path resolution for external npm modules