Skip to content

Commit bb69a08

Browse files
committedJan 25, 2025
fix: project validation not working on windows
1 parent eb3a7bf commit bb69a08

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎src/cli/utils/validate-project.ts

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
import { access } from "fs/promises";
1+
import { access, readFile } from "fs/promises";
22
import { join } from "path";
33

44
export async function validateMCPProject() {
55
try {
66
const packageJsonPath = join(process.cwd(), "package.json");
77
await access(packageJsonPath);
88

9-
const package_json = (
10-
await import(packageJsonPath, { assert: { type: "json" } })
11-
).default;
9+
const package_json = JSON.parse(await readFile(packageJsonPath, "utf-8"));
1210

1311
if (!package_json.dependencies?.["mcp-framework"]) {
1412
throw new Error(

0 commit comments

Comments
 (0)
Please sign in to comment.