JonasJ
Denoβ€’2y agoβ€’
2 replies
Jonas

Compile to exe

Every time I run my exe I get the following error:


But when I start my code normally with node main.js it works without problems.

This is my code:
import chalk from "chalk";
import figlet from "figlet";
import gradient from "gradient-string";
import { choose, programInfo } from "./lib/helper.js";
import dotenv from "dotenv";

//Config
dotenv.config();

//Main
const currentVersion = Number(process.env.VERSION);
const serverVersion = await programInfo();

if (currentVersion !== serverVersion.version) {
  console.log(
    chalk.red(
      "Your version is outdated. Please update to the latest version to continue."
    )
  );
  process.exit(0);
}

await choose();
image.png
Was this page helpful?