diff --git a/ets2panda/driver/build_system/src/build/base_mode.ts b/ets2panda/driver/build_system/src/build/base_mode.ts index 99fad43361e17410ff39ad8d33eea57178f1010c..16ace8bf34a618b159464adec4782780b906cbbd 100644 --- a/ets2panda/driver/build_system/src/build/base_mode.ts +++ b/ets2panda/driver/build_system/src/build/base_mode.ts @@ -491,6 +491,11 @@ export abstract class BaseMode { processed.add(currentFile); (this.dependencyFileMap?.dependants[currentFile] || []).forEach(dependant => { + // For the 1.1 declaration file referenced in dynamicPaths, if a path is detected as non-existent, it will be skipped. + const isFileExist = fs.existsSync(dependant); + if (!isFileExist) { + return; + } if (!compileFiles.has(dependant) && !processed.has(dependant)) { queue.push(dependant); }