diff --git a/packages/generator/generator-utils/src/index.ts b/packages/generator/generator-utils/src/index.ts index 9a5b42a90c0c..cc1c956dc863 100644 --- a/packages/generator/generator-utils/src/index.ts +++ b/packages/generator/generator-utils/src/index.ts @@ -118,9 +118,13 @@ export async function getModernPluginVersion( if (typeof modernVersion !== 'string') { return getLatetPluginVersion(); } - const version = getAvailableVersion(packageName, modernVersion, registry); + const version = await getAvailableVersion( + packageName, + modernVersion, + registry, + ); if (!(await isPackageExist(`${packageName}@${version}`))) { - return getLatetPluginVersion(packageName); + return getLatetPluginVersion(); } return version; }