chore: added checks for bunx f6178376
Steve · 2025-12-12 19:33 2 file(s) · +22 −0
src/installers/tanstack-router.ts +12 −0
17 17
	}).start();
18 18
19 19
	try {
20 +
		// Check if bunx is available
21 +
		try {
22 +
			await execa("bunx", ["--version"]);
23 +
		} catch {
24 +
			spinner.error("bunx is not available");
25 +
			consola.error(
26 +
				pc.red("Error:"),
27 +
				"bunx must be installed. Please install Bun first: https://bun.sh",
28 +
			);
29 +
			return false;
30 +
		}
31 +
20 32
		const { projectName, rpc, shadcn, tailwind, tanstackQuery } = options;
21 33
22 34
		const projectPath = path.resolve(process.cwd(), projectName);
src/lib/setup-biome.ts +10 −0
7 7
export async function setupBiome(projectPath: string): Promise<void> {
8 8
	const spinner = yoctoSpinner({ text: "Setting up Biome..." }).start();
9 9
	try {
10 +
		// Check if bunx is available
11 +
		try {
12 +
			await execa("bunx", ["--version"]);
13 +
		} catch {
14 +
			spinner.error("bunx is not available");
15 +
			throw new Error(
16 +
				"bunx must be installed. Please install Bun first: https://bun.sh",
17 +
			);
18 +
		}
19 +
10 20
		const clientPath = path.join(projectPath, "client");
11 21
		const clientPkgJsonPath = path.join(clientPath, "package.json");
12 22
		const eslintConfigPath = path.join(clientPath, "eslint.config.js");