update identify-resource: handle node_modules with 'main' directories