require package version from correct folder
Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
parent
1e2d736d6d
commit
cfe9345b53
|
@ -4028,7 +4028,7 @@ function InstallModules(modules, args, func) {
|
|||
try {
|
||||
// Does the module need a specific version?
|
||||
if (moduleVersion) {
|
||||
if (require(`${moduleName}/package.json`).version != moduleVersion) { throw new Error(); }
|
||||
if (require(`./node_modules/${moduleName}/package.json`).version != moduleVersion) { throw new Error(); }
|
||||
} else {
|
||||
// For all other modules, do the check here.
|
||||
// Is the module in package.json? Install exact version.
|
||||
|
|
Loading…
Reference in New Issue