Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workaround] Master branch won't build locally due an error importing GLPK #155

Open
Makeshift opened this issue Jul 23, 2023 · 1 comment

Comments

@Makeshift
Copy link

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:

import GLPKConstructor, { GLPK, LP, Result } from "glpk.js";
//declare const GLPKConstructor: () => GLPK;

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
@Mijago
Copy link
Owner

Mijago commented Jul 23, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants