diff --git a/npm/scripts/validate-versions.ts b/npm/scripts/validate-versions.ts index a5a53617d7..616c04adc5 100644 --- a/npm/scripts/validate-versions.ts +++ b/npm/scripts/validate-versions.ts @@ -35,11 +35,18 @@ async function compare() { for (let i = 0; i < packageFolders.length; i++) { const folder = packageFolders[i]; const pkgJsonPath = `${packagesPath}/${folder}/package.json`; + + if (!(await fse.pathExists(pkgJsonPath))) { + continue; + } + let pkgJson; try { pkgJson = await fse.readJSON(pkgJsonPath); - } catch (error) {} + } catch (error) { + continue; + } if ( !excludedPackages.includes(pkgJson.name) &&