Node.JS module to retrieve configuration from environment variables
Disclaimer: since I'm not familiar with export/import realm, my suggestion below might be too naive and not work. If so, rather than only downvoting, thanks in advance for a little comment pointing me to a resource which would enlight how and why I'm wrong.

That's said, with merely my pure JS skills, here is how I'd work:

var keys = [
  'SAMPLE_SECRET',
  'SAMPLE_SECRET_MORE'
];
keys.forEach(function(keyName) {
  Object.defineProperty(module.exports, keyName, {
      get: function() {
          if (!process.env[keyName]) {
              console.error(
                "ExternalVars error! Could not load a value for: " + keyName
              );
              process.exit(1);
          } else {
              return process.env[keyName];
          }
      }
  });
});