require package version from correct folder

Signed-off-by: si458 <simonsmith5521@gmail.com>
This commit is contained in:
si458 2024-10-17 20:18:05 +01:00
parent 1e2d736d6d
commit cfe9345b53
1 changed files with 1 additions and 1 deletions

View File

@ -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.