D2ArmorPicker
D2ArmorPicker copied to clipboard
[Workaround] Master branch won't build locally due an error importing GLPK
I know you're aware of this one and you provided a workaround in Discord a while back, but I thought I'd share the workaround for anyone wanting to run a dev instance locally.
Replace line 19 and 20 in this file: https://github.com/Mijago/D2ArmorPicker/blob/93d240500fd724ec1b9652521ec224abd0d8d5bf/src/app/components/authenticated-v2/subpages/theorizer-page/theorizer-page.component.ts#L19-L20
with:
import { GLPK, LP, Result } from "glpk.js";
declare const GLPKConstructor: () => GLPK;
Local instances should now build and from a quick play around, seems to work fine.
If a diff is easier:
From 94306cbde2becb5284e2ac757b3333dc9fe28da4 Mon Sep 17 00:00:00 2001
From: "Connor Bell (Makeshift)" <[email protected]>
Date: Sun, 23 Jul 2023 14:10:06 +0100
Subject: [PATCH] Workaround for GLPK import error
---
.../subpages/theorizer-page/theorizer-page.component.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/app/components/authenticated-v2/subpages/theorizer-page/theorizer-page.component.ts b/src/app/components/authenticated-v2/subpages/theorizer-page/theorizer-page.component.ts
index e7e3344..adf07f6 100644
--- a/src/app/components/authenticated-v2/subpages/theorizer-page/theorizer-page.component.ts
+++ b/src/app/components/authenticated-v2/subpages/theorizer-page/theorizer-page.component.ts
@@ -16,8 +16,8 @@
*/
import { Component, OnInit } from "@angular/core";
-import GLPKConstructor, { GLPK, LP, Result } from "glpk.js";
-//declare const GLPKConstructor: () => GLPK;
+import { GLPK, LP, Result } from "glpk.js";
+declare const GLPKConstructor: () => GLPK;
import { ModifierType } from "src/app/data/enum/modifierType";
import { IInventoryArmor } from "../../../../data/types/IInventoryArmor";
import { ArmorSlot } from "../../../../data/enum/armor-slot";
--
2.25.1
Thank you!