diff --git a/ets2panda/driver/build_system/src/build/base_mode.ts b/ets2panda/driver/build_system/src/build/base_mode.ts index 216a80d91938c27d97d50a34df1825e8b1ad0eec..9b30fbff33d619f26ac24915fb739ff8ffd72fca 100644 --- a/ets2panda/driver/build_system/src/build/base_mode.ts +++ b/ets2panda/driver/build_system/src/build/base_mode.ts @@ -558,6 +558,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); }