diff --git a/core/src/node/extension/manager.ts b/core/src/node/extension/manager.ts index 9173504a7..618a5ed9f 100644 --- a/core/src/node/extension/manager.ts +++ b/core/src/node/extension/manager.ts @@ -47,7 +47,7 @@ export class ExtensionManager { const extensionsJson = join(extDir, "extensions.json"); if (!existsSync(extensionsJson)) - writeFileSync(extensionsJson, "{}", "utf8"); + writeFileSync(extensionsJson, "{}", "utf-8"); this.extensionsPath = extDir; } catch (error) { diff --git a/core/src/node/extension/store.ts b/core/src/node/extension/store.ts index 8e11c2bb2..2225479ca 100644 --- a/core/src/node/extension/store.ts +++ b/core/src/node/extension/store.ts @@ -84,7 +84,7 @@ export function persistExtensions() { writeFileSync( ExtensionManager.instance.getExtensionsFile(), JSON.stringify(persistData), - "utf8" + "utf-8" ); } diff --git a/extensions/inference-nitro-extension/src/module.ts b/extensions/inference-nitro-extension/src/module.ts index 671d67f9c..7678bae19 100644 --- a/extensions/inference-nitro-extension/src/module.ts +++ b/extensions/inference-nitro-extension/src/module.ts @@ -61,7 +61,7 @@ async function updateNvidiaDriverInfo(): Promise { (error, stdout) => { let data; try { - data = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf8")); + data = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf-8")); } catch (error) { data = DEFALT_SETTINGS; } @@ -109,7 +109,7 @@ function updateCudaExistence() { let data; try { - data = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf8")); + data = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf-8")); } catch (error) { data = DEFALT_SETTINGS; } @@ -127,7 +127,7 @@ async function updateGpuInfo(): Promise { (error, stdout) => { let data; try { - data = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf8")); + data = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf-8")); } catch (error) { data = DEFALT_SETTINGS; } @@ -376,7 +376,7 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise { let cudaVisibleDevices = ""; let binaryName; if (process.platform === "win32") { - let nvida_info = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf8")); + let nvida_info = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf-8")); if (nvida_info["run_mode"] === "cpu") { binaryFolder = path.join(binaryFolder, "win-cpu"); } else { @@ -392,7 +392,7 @@ function spawnNitroProcess(nitroResourceProbe: any): Promise { } binaryName = "nitro"; } else { - let nvida_info = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf8")); + let nvida_info = JSON.parse(readFileSync(NVIDIA_INFO_FILE, "utf-8")); if (nvida_info["run_mode"] === "cpu") { binaryFolder = path.join(binaryFolder, "linux-cpu"); } else {