Compdigitec Labs

« | Home

Scala.js – Referring to non-existent class

By admin | September 9, 2021

Referring to non-existent class MyClass$
  called from JSClass$.jsMethod()void
  called from JSClass$.$js$exported$meth$jsMethod()java.lang.Object
  exported to JavaScript with @JSExport
involving instantiated classes:
  JSClass$
    exported to JavaScript with @JSExport
Cannot access module for non-module MyClass$
  called from JSClass$.jsMethod()void
  called from JSClass$.$js$exported$meth$jsMethod()java.lang.Object
  exported to JavaScript with @JSExport
involving instantiated classes:
  JSClass$
    exported to JavaScript with @JSExport

Related issue: https://github.com/scala-js/scala-js/issues/629

If the issue is coming from a shared module being used in both a Scala.js and JVM setting, the issue may be that the shared module is not being compiled for Scala.js. We can fix that as follows by compiling it for both. Mill example below:

object MyObject extends ScalaModule with ScalaJSModule with ScalafmtModule {
  // ...
}

// Instead of

object MyObject extends ScalaModule with ScalafmtModule {
  // ...
}

If you found this article helpful or interesting, please help Compdigitec spread the word. Don’t forget to subscribe to Compdigitec Labs for more useful and interesting articles!

Topics: Code | 7 Comments »

7 Responses to “Scala.js – Referring to non-existent class”

  1. Antony Christ Says:
    April 12th, 2022 at 08:09

    Are you in need of professional assignment helpers? Well! You have reached the right place at My Case Study Help.Com where you receive a one-stop solution. We offer one of the finest MBA Assignment Help for students’ benefit. We have more than 5000 professional Case Study Writer experts to support students in doing their university projects. We provide assured quality and credibility. That’s why a majority of students trust our Assignment Help.

  2. pg auto Says:
    June 19th, 2022 at 02:54

    ดูดวงรายวัน เล่นสล็อตโชคดีขึ้น เรื่องของดวงมัน อยู่ที่รากฐานของแต่ละคนด้วยนะ pg-slot.game มีเกมมากมายให้คุณได้เลือกเล่นจะดวงดีโชคร้ายก็ไม่สามารถ ที่จะบอกได้ ด้วยเหตุว่าโน่นเป็น “ดวง” ดังการดูดวง แต่เกม pg ของเรานั้นมีแต่ความสนุกสนานแน่นอน

  3. pg slot เว็บตรง แตกไว Says:
    July 11th, 2022 at 00:21

    pg slot เว็บตรง แตกไว สล็อตน่าเล่น มีเกม สล็อต เว็บไซต์ตรง แจกเครดิตฟรี ให้เลือกเล่นล้นหลามมากมายแบบอย่าง เสมือนเลียนแบบแหล่งคาสิโนจากสถานที่จริงๆมาไว้บนโทรศัพท์เคลื่อนที่

  4. Escorts in Peddapuram Says:
    October 10th, 2022 at 02:42

    The Escort Association Never Cries From Their Clients About Setback Of Association Or Late Vehicle. Free Escorts Peddapuram In case Their Clients Are Organized In The Other State Or Country, They Confirmation Their Clients That They Will Get Their Client At The Most Solid.

  5. Gurgaon Call Girls Says:
    November 23rd, 2022 at 05:04

    If you genuinely need to call young ladies in Gurgaon for stunning Gurgaon goes with affiliations, then, review us in a way. We ensure the best inside at the most sensible costs. In that limit, try to look involving all possible procedures for the pages we have on our site.

  6. Ujjain Escort Says:
    December 24th, 2022 at 07:16

    By And Large, I Attempt To Give A Review For The Staggering Call Young Woman You Booked Through Us. Additionally, If You Get The Best Stripper Call Young Woman In Ujjain Escorts Through Us Then, In The Event That No One Really Minds Somehow, Support Our Affiliations And Site To Your Aides To Help Us With Making. You Can Generally Speak Show Us Concerning The Going With Extensive Call Young Woman You Meet Through Various Battles.

  7. Escorts Service Dehradun Says:
    December 31st, 2022 at 00:16

    Secluded From Fulfilling All Your Affirmed Necessities, These Call Young women Correspondingly Satisfy You Mentally. This Is The Very Clarification That Different Clients Visit These Call Young women Reliably.

Comments