We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb3a7bf commit bb69a08Copy full SHA for bb69a08
src/cli/utils/validate-project.ts
@@ -1,14 +1,12 @@
1
-import { access } from "fs/promises";
+import { access, readFile } from "fs/promises";
2
import { join } from "path";
3
4
export async function validateMCPProject() {
5
try {
6
const packageJsonPath = join(process.cwd(), "package.json");
7
await access(packageJsonPath);
8
9
- const package_json = (
10
- await import(packageJsonPath, { assert: { type: "json" } })
11
- ).default;
+ const package_json = JSON.parse(await readFile(packageJsonPath, "utf-8"));
12
13
if (!package_json.dependencies?.["mcp-framework"]) {
14
throw new Error(
0 commit comments