diff --git a/lib/Serverless.js b/lib/Serverless.js index bb2ebb117..5a9dbabf1 100644 --- a/lib/Serverless.js +++ b/lib/Serverless.js @@ -56,8 +56,6 @@ class Serverless { this.commands = {}; this.cli = null; this.utils = require('./utils/index'); - - this.initProviders(); } /** @@ -93,6 +91,9 @@ class Serverless { silent: true, // Don't display dotenv load failures for admin.env if we already have the required environment variables path: path.join(_this.getProject().getRootPath(), 'admin.env') }); + }) + .then(function() { + _this.initProviders(); }); } });