const providers = {
  "env": require('provider/env'),
  "file": require('provider/file')
}

module.exports.resolve = function(config) {
  const providerType = config.type
  const provider = providers[providerType]
  return provider.init(config)
}

const providers = {
  "env": require('provider/env'),
  "file": require('provider/file')
}

module.exports.resolve = function(config) {
  const providerType = config.type
  const provider = providers[providerType]
  if(provider !== undefined) {
    return provider.init(config)
  }
}

Add check for undefined provider
Add check for undefined provider
