add .js extension, use require.resolve