openharmony 鸿蒙 errorcode-es2abc

2026-08-25 浏览 (1)

es2abc Compiler Error Codes

NOTE

This section describes the error codes of the es2abc compiler module. For details about universal error codes, see Universal Error Codes.

10705000 Syntax Error

Error Message

Example

ERROR: 10705000 Syntax Error
SyntaxError: Concurrent function should only use import variable or local variable, 'a' is not one of them [/path/to/wrong/file.ts:9:4]

Description

The compiler cannot parse a syntax structure in the source file. The error information contains the file name, line number, and column number.

Possible Causes

  1. The code contains invalid or incomplete syntax, for example, missing brackets, spelling errors, and incorrect structure nesting.
  2. The code uses language features that are not supported by the current version.
  3. The keyword or syntax structure cannot be identified due to spelling errors.
  4. Encryption software may exist in the environment and modify the file encoding format.

Solution

  1. Locate the error based on the file name and line number in the error message.
  2. Fix syntax errors, for example, add missing brackets or keywords.
  3. Use the syntax check tool of DevEco Studio to detect syntax errors.
  4. If the new syntax feature is used, ensure that the current compiler version supports the feature.
  5. If encryption software is used, stop it and recompile the code.

10706001 Specification Error

Error Message

Example

ERROR: 10706001 Found unsupported change in file, failed to generate patch abc!
[Patch] Found lexical variable added or removed in .a, not supported!
[Patch] Found unsupported change in file, will not generate patch!
Error:  [base_mod.js:0:0]

Description

The compiler detects that the source file contains changes that are not supported by incremental compilation (patch mode). As a result, the patch generation is terminated. These changes usually involve code modifications that significantly affect the semantics, such as scope, variable declaration, and import structure.

Possible Causes

  1. In the patch build process, the lexical variables of the module are modified, for example, declarations are added or deleted.
  2. Key functions are deleted or existing variables are redeclared.
  3. The import/export structure or module boundary is destructively modified.
  4. The file modification is not supported by the es2abc incremental patch mechanism.

Solution

  1. Check the file and code changes in the error message.
  2. Do not add, delete, or rename variables defined in the module.
  3. If semantic changes are required, select full compilation instead of incremental compilation.

你可能感兴趣的鸿蒙文章

openharmony 鸿蒙 arkts-apis-arkts-collections-Float32Array

openharmony 鸿蒙 arkts-apis-arkts-collections-ArrayBuffer

openharmony 鸿蒙 js-apis-lightweightset

openharmony 鸿蒙 errorcode-source-obfuscation

openharmony 鸿蒙 arkts-apis-arkts-utils-ASON

openharmony 鸿蒙 arkts-apis-arkts-collections-Uint8ClampedArray

openharmony 鸿蒙 errorcode-tsc

openharmony 鸿蒙 js-apis-deque

openharmony 鸿蒙 arkts-apis-arkts-collections-BitVector

openharmony 鸿蒙 js-apis-worker

  • 所属分类: 后端技术
  • 本文标签: 鸿蒙 软件
  • 版权声明: 本文链接 https://seaxiang.com/blog/Kg1jn8eZ