Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-138391

Deep-nested QML module containing *.mjs file can cause ambiguous import

    XMLWordPrintable

Details

    • 8a29649cb (dev), 783e03999 (6.10), b91da5042 (6.9)

    Description

       

      This has similar symptoms and workarounds as QTBUG-133587 but this doesn't involve QTP0004

      The attached project fails to run:

      QQmlApplicationEngine failed to load component
      qrc:/qt/qml/App/Main.qml: "MyModule" is ambiguous. Found in qrc:/qt/qml/MyModule/ and in qrc:/qt/qml/MyModule/
      qrc:/qt/qml/App/Main.qml: Failed to load dependent import "MyModule" version 255.255
      

      The error goes away with any one of the following actions:

      • Removing the *.mjs file from MyModule
      • Replacing "IMPORTS MyModule" with "DEPENDENCIES MyModule" (or just removing the IMPORTS)
      • Moving the module from ${CMAKE_SOURCE_DIR}/modules/MyModule to ${CMAKE_SOURCE_DIR}/MyModule

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-138391
          # Subject Branch Project Status CR V

          Activity

            People

              ulherman Ulf Hermann
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes