【发布时间】:2021-08-25 00:22:09
【问题描述】:
**嗨,我不知道这里发生了什么,这是一个有依赖关系的发布,这是一个我没有编写的代码,它是一个捆绑包,我使用 expo 运行我的代码,但是,无法打开我的应用程序,因为那个错误请帮忙!!这是一个大学项目**
function resolveDependencies(parentPath, dependencies, options) {
const resolve = (parentPath, result) => {
const relativePath = result.name;
try {
return [
relativePath,
{
absolutePath: options.resolve(parentPath, relativePath),
data: result
}
];
} catch (error) {
忽略不可用的可选依赖项。它们由 try-catch 块保护,并将在运行时处理。
if (result.data.isOptional !== true) {
throw error;
}
}
return undefined;
};
const resolved = dependencies.reduce((list, result) => {
const resolvedPath = resolve(parentPath, result);
if (resolvedPath) {
list.push(resolvedPath);
}
return list;
}, []);
return new Map(resolved);
}
- 重新遍历 DFS 中的依赖关系图以重新排序模块和
- 保证运行之间的顺序相同。此方法对传递的图进行变异。
【问题讨论】:
标签: javascript android dependencies expo react-native-android