D
Deno

help

Compile to exe

JJonas2/10/2024
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();
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();
No description
Ddivy2/10/2024
import process from "node:process"
import process from "node:process"
Add this import ^
JJonas2/10/2024
Thank you very much :deno_thankyou:

Looking for more? Join the community!