From 1b030935f60b4b45580de8336f2bfc3a6fa7efc0 Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Mon, 26 Jun 2023 13:52:14 +0200 Subject: [PATCH] Fix dotenv import --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index d63c4a7..4ce62a2 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,6 @@ import { execSync, spawn } from 'child_process'; import { publicIpv4 } from 'public-ip'; +import dotenv from 'dotenv'; import fs from 'fs'; import os from 'os'; @@ -302,7 +303,7 @@ async function runBatch(vpn) { (async () => { await checkUpdate(); if (fs.existsSync('.env')) { - require('dotenv').config({ path: '.env' }); + dotenv.config({ path: '.env' }); logManager(`[${host}] Config file: .env.`, 'info'); } else {