Skip to content

Commit 13bb3d6

Browse files
fix: use '.js' extension for script files
Change file extension to '.js' for consistency. Co-authored-by: Kevin Thomas <46242684+kevinjosethomas@users.noreply.github.com>
1 parent 4b9a8ea commit 13bb3d6

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

scripts/fix-lockfile.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { execSync } from "child_process";
2+
import { unlinkSync, existsSync } from "fs";
3+
4+
const lockfilePath = "package-lock.json";
5+
6+
if (existsSync(lockfilePath)) {
7+
console.log("Removing existing package-lock.json...");
8+
unlinkSync(lockfilePath);
9+
} else {
10+
console.log("No existing package-lock.json found.");
11+
}
12+
13+
console.log("Running npm install --legacy-peer-deps to regenerate lock file...");
14+
try {
15+
execSync("npm install --legacy-peer-deps", { stdio: "inherit" });
16+
console.log("Lock file regenerated successfully.");
17+
} catch (error) {
18+
console.error("npm install failed:", error.message);
19+
process.exit(1);
20+
}

0 commit comments

Comments
 (0)