Warnings occurred while importing¶
[import] The imported module was not found.
This warning category is spelled [import] by qmllint.
Failed to import module¶
What happened?¶
The module imported via import statement was not found.
This can be caused, for example, by
a typo in the import statement, or
a user-defined module that was not built, or
a wrong import path , or
a missing module
Why is this bad?¶
The application can’t run because it can’t find a module it relies on.
Examples¶
Typo In The Import Statement¶
To fix this warning, correct the typo:
User-defined module that was not built¶
Some tooling like QML Language Server or qmllint can’t find user-defined modules when they are not built. If your project defines the QML Module you are trying to import, then the QML tooling will not find it until you build it.
Note
If building the module does not help when using QML Language Server , follow the instructions in QML Language Server setup instructions and make sure that you communicate the correct build folder to QML Language Server.
Wrong import path¶
Please refer to the QML import path documentation and to the debugging module import documentation for more information about import paths.
Missing module¶
If the previous sections did not help to find the imported module, it might be missing. This might be caused by a missing dependency. When using external libraries, verify that they are actually installed, and that their modules end up in an import path .
Component was not found¶
What happened?¶
Some component was not found.
Why is this bad?¶
The application can’t run because it can’t instantiate the non-found component.
Examples¶
Typo in the component name¶
To fix this warning, correct the typo:
Missing import statement¶
To fix this warning, add the missing module import:
Import qualifier must start with a capital letter¶
What happened?¶
Some imported module has an invalid qualifier.
Why is this bad?¶
The module imported with this invalid qualifier can’t be used.
Examples¶
To fix this warning, make the import qualifier start with an upper case letter:
Unknown import syntax¶
What happened?¶
An import statement is using an invalid import syntax .
Why is this bad?¶
The application can’t run because it can’t import a module it relies on.
Examples¶
To fix this warning, use URLs that have an allowed scheme: