This topic describes only module-specific error codes. For details about universal error codes, see Universal Error Codes.
Error Message
Importing ArkTS files in JS and TS files is forbidden.
Description
It is forbidden to import ArkTS files to JS or TS files.
Possible Causes
ArkTS files have been imported in JS and TS files.
Solution
Remove the import statements for ArkTS files from JS and TS files.
Error Message
Failed to resolve OhmUrl. Failed to get a resolved OhmUrl for ${filePath} imported by ${importerFile}.
Description
Failed to resolve OhmUrl. Failed to obtain the parsed OhmUrl for ${filePath} imported by ${importerFile}.
Possible Causes
The ${pkgName} module to which ${filePath} belongs is configured incorrectly.
Solution
Error Message
Kit ${moduleRequest} has no corresponding config file in ArkTS SDK.
Description
The ${moduleRequest} kit does not have the corresponding configuration file in the ArkTS SDK.
Possible Causes
Solution
Error Message
Identifier ${this.importName} comes from ${this.symbol.source} which can not be imported in .ts file.
Description
The identifier ${this.importName} comes from ${this.symbol.source}. This identifier cannot be imported to a .ts file.
Possible Causes
An ArkTS file of the kit is imported to the TS file.
Solution
Remove the import statement or change the file name extension to .ets.
Error Message
${importName} is not exported from Kit ${KitInfo.getCurrentKitName()}.
Description
Kit ${importName} is not exported from ${KitInfo.getCurrentKitName()}.
Possible Causes
Solution
Error Message
Namespace import or export of Kit is not supported currently.
Description
Currently, the namespace of a kit cannot be imported or exported.
Possible Causes
The file uses the namespace of the kit for import or export.
Solution
Replace the namespace import or export of the kit with a named import or export. Example: import * as ArkTS from "@kit.ArkUI"; -> import { AlertDialog } from "@kit.ArkUI";
Error Message
Can not use empty import(side-effect import) statement with Kit ${(kitNode.moduleSpecifier as ts.StringLiteral).text.replace(/'|"/g, '')}.
Description
Empty import (side-effect import) statements cannot be used in Kit ${(kitNode.moduleSpecifier as ts.StringLiteral).text.replace(/'|"/g, '')}.
Possible Causes
The empty import (side-effect import) statement of the kit is used in the file.
Solution
Specify the symbol to be imported. Example: import "@kit.ArkUI"; -> import { lang } from "@kit.ArkUI";
Error Message
Failed to execute es2abc.
Description
es2abc fails to be executed.
Possible Causes
An error occurred during the execution of es2abc.
Solution
For details, see es2abc Compiler Error Codes.
Error Message
${elementText} of lazy-import is re-export.
Description
The lazy import of ${elementText} is re-exported.
Possible Causes
The lazy-imported ${elementText} lazy-imported is exported again.
Solution