Kipper-Lang / Kipper

The Kipper programming language for Browsers and Node.js 🦊✨ Made at HTL Leonding & JKU Linz
https://kipper-lang.org
GNU General Public License v3.0
26 stars 4 forks source link

[Bug] RunKit Error with `antlr4ts` - TypeError: Class extends value undefined is not a constructor or null #12

Open Luna-Klatzer opened 2 years ago

Luna-Klatzer commented 2 years ago

Describe the bug

The package fails to load properly due to an error caused by the dependency antlr4ts. This is most likely caused due to circular imports, meaning this issue likely can't be fixed with updates or restructuring of our source code.

To Reproduce

Steps to reproduce the behaviour:

  1. Use @kipper/base using Node.JS in a JavaScript environment
  2. Include @kipper/base using require()
  3. View error

Expected behaviour

Default inclusion without any error.

Screenshots

Error on RunKit: image

Desktop (please complete the following information):

Additional context

Luna-Klatzer commented 2 years ago

Still reproducible with the latest release 0.8.3 and antlr4ts@0.5.0-dev.

RunKit Run: https://runkit.com/embed/vewk6ve5pu4k

Luna-Klatzer commented 2 years ago

Using an updated import configuration of antlr4ts, the dependencies from the package can be imported without any issue. This means that if the package is imported the same way in the source code, the circular import issue could be resolved.

RunKit Run: https://runkit.com/embed/cxtmn6r7f3dj