From ad235a6a7a87c0fe0cf4fe104bf20c7a797d64fa Mon Sep 17 00:00:00 2001 From: Daniel Schep Date: Tue, 21 May 2019 14:31:58 -0400 Subject: [PATCH] remove sfe node version check & change what require hacks we use --- lib/classes/PluginManager.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/classes/PluginManager.js b/lib/classes/PluginManager.js index 45406cdfd..782eb95fd 100644 --- a/lib/classes/PluginManager.js +++ b/lib/classes/PluginManager.js @@ -156,11 +156,10 @@ class PluginManager { } loadEnterprisePlugin() { - const qualifiedEnterpriseModulePath = path.join( - __dirname, '../../node_modules/@serverless/enterprise-plugin'); + module.paths.unshift(path.join( __dirname, '../../node_modules') + this.loadPlugins(['@serverless/enterprise-plugin']); // eslint-disable-next-line global-require - const sfePkgJson = require(`${qualifiedEnterpriseModulePath}/package.json`); - this.loadPlugins([qualifiedEnterpriseModulePath]); + const sfePkgJson = require(`@serverless/enterprise-plugin/package.json`); if (this.serverless.enterpriseEnabled) { const updates = updateNotifier({ pkg: sfePkgJson, interval: 1 }); if (updates.update) {