Revert "require package version from correct folder"

This reverts commit cfe9345b53.
This commit is contained in:
si458 2024-11-04 13:59:50 +00:00
parent e58d659fa9
commit 0ec8b061c8

View File

@ -4033,7 +4033,7 @@ function InstallModules(modules, args, func) {
try { try {
// Does the module need a specific version? // Does the module need a specific version?
if (moduleVersion) { if (moduleVersion) {
if (require(`./node_modules/${moduleName}/package.json`).version != moduleVersion) { throw new Error(); } if (require(`${moduleName}/package.json`).version != moduleVersion) { throw new Error(); }
} else { } else {
// For all other modules, do the check here. // For all other modules, do the check here.
// Is the module in package.json? Install exact version. // Is the module in package.json? Install exact version.