Skip to content

Environment detection on Node.js 18  #10

Open

Description

@Xmader

LibreScore/dl-librescore#16

Node.js 18 added a few browser-compatible APIs, so webmscore could no longer properly detect if it's running in a Node.js environment or browser environment.

Activity

  1. Xmader commented on Mar 27, 2023

    @Xmader
    MemberAuthor

    My local development/test environment is Node.js 16, and the CI runs on Node.js 12.

    I should update the CI to test on multiple Node.js versions.

  2. PeterNjeim commented on Apr 19, 2024

    @PeterNjeim
    Member
  3. CarlGao4 commented on Apr 20, 2025

    @CarlGao4

    I've updated CI to Node.js 16 as some requirements have been upgraded and running on Node.js 12 could cause error. I'm still trying to solve this issue.

  4. CarlGao4 commented on Apr 21, 2025

    @CarlGao4

    After some research, I've found that to support Node.js 18+, we need to upgrade emsdk to at least 3.1.61. However, according to Qt docs, Qt 5.15.2 (Which is used by MuseScore up to 4.3.2) is designed for emsdk 1.39.8, so it's quite a good news that it even support emsdk as late as 2.0.6 which is used by webmscore now. I've tested that 3.1.61 could not build the app. According to newer docs, we can see that we should even update Qt to 6.9 to ensure emsdk 3.1.61 could successfully build Qt. Maybe actually Qt 6.7 (which uses emsdk 3.1.50) or Qt 6.6 (which uses emsdk 3.1.37) would be enough, but now MuseScore is still sticking to Qt 6.2.4 (explained on MuseScore GitHub wiki), so the version of emsdk and Qt and MuseScore that are compatible should be tested.

    I've created a new branch on my fork but I'm not sure whether I'll do the researches, as the wasm could be ran in browsers and we can just ask users to downgrade their Node.js and emsdk to run these in README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions