diff --git a/resources/diff-npm-package.ts b/resources/diff-npm-package.ts index ff448dc10f..dabf2cb2b7 100644 --- a/resources/diff-npm-package.ts +++ b/resources/diff-npm-package.ts @@ -33,6 +33,9 @@ if (diff === '') { console.log('No changes found!'); } else { const reportPath = localRepoPath('reports', 'npm-dist-diff.html'); + if (!fs.existsSync(reportPath)) { + fs.mkdirSync(reportPath); + } fs.writeFileSync(reportPath, generateReport(diff)); console.log('Report saved to: ', reportPath); }