Closed bigplayer-ai closed 4 months ago
this solved the issue for me:
import { writeFileSync } from "fs";
import { join } from "path";
import { isEqual } from "lodash";
import packageJson from "../package.json";
import { Command } from "./types";
export function writePackageJsonContents(commands: Command[]): void {
if (!isEqual(packageJson.commands, commands)) {
// Removed @ts-expect-error directive
packageJson.commands = commands.map(({ parameter: _parameter, ...command }) => command);
writeFileSync(join(__dirname, "../package.json"), JSON.stringify(packageJson, null, 2), "utf-8");
}
}
Bug Report
Description: The executable JS file for the command is not found after building and importing the extension into Raycast after running any raycast command:
This other issue arises during the build process with the following error encountered:
Steps to Reproduce:
Expected Behavior: The extension should build successfully without errors, and commands should run as expected in Raycast.
Actual Behavior: Encountered TypeScript compilation error as shown above, preventing the successful build and execution of commands in Raycast.
Here is my config.ts configuration: config.ts.zip