diff --git a/lib/modules/code_generator/index.js b/lib/modules/code_generator/index.js index 371f69682..6b4920844 100644 --- a/lib/modules/code_generator/index.js +++ b/lib/modules/code_generator/index.js @@ -289,7 +289,7 @@ class CodeGenerator { function getWeb3Location(next) { self.events.request("version:get:web3", function(web3Version) { if (web3Version === "1.0.0-beta") { - return next(null, fs.embarkPath("node_modules/web3")); + return next(null, require.resolve("web3")); } self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) { return next(null, fs.dappPath(location)); @@ -350,7 +350,7 @@ class CodeGenerator { function getWeb3Location(next) { self.events.request("version:get:web3", function(web3Version) { if (web3Version === "1.0.0-beta") { - return next(null, utils.joinPath(fs.embarkPath("node_modules/web3"))); + return next(null, require.resolve("web3")); } self.events.request("version:getPackageLocation", "web3", web3Version, function(err, location) { return next(null, fs.dappPath(location));