diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index 0a828867692473..85658bc98d9dc1 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -136,7 +136,7 @@ function getPackageScopeConfig(resolved, base) { const packageJSONPath = packageJSONUrl.pathname; if (StringPrototypeEndsWith(packageJSONPath, 'node_modules/package.json')) break; - const packageConfig = getPackageConfig(fileURLToPath(packageJSONUrl), base); + const packageConfig = getPackageConfig(fileURLToPath(packageJSONUrl)); if (packageConfig.exists) return packageConfig; const lastPackageJSONUrl = packageJSONUrl; @@ -608,7 +608,7 @@ function packageResolve(specifier, base, conditions) { } // Package match. - const packageConfig = getPackageConfig(packageJSONPath, base); + const packageConfig = getPackageConfig(packageJSONPath); if (packageConfig.exports !== undefined && packageConfig.exports !== null) return packageExportsResolve( packageJSONUrl, packageSubpath, packageConfig, base, conditions