getWeb3Location should use require.resolve() for "version:get:web3" event

This commit is contained in:
Michael Bradley, Jr 2018-09-07 15:52:30 -05:00
parent a622f22dcd
commit 13e21702d2
1 changed files with 2 additions and 2 deletions

View File

@ -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));