如何检测本机反应中的循环依赖导入? [英] How to detect cyclic dependency imports in react native?

查看:65
本文介绍了如何检测本机反应中的循环依赖导入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有任何包或解决方案可以检测 React Native 中的循环依赖项导入?

Is there any package or solution to detect cyclic dependency imports in react native?

[或]

我可以在运行应用程序时获取循环导入的堆栈跟踪吗?

Can I get a stack trace for cyclic imports when running the app?

目前循环依赖导入返回未定义的值,没有说明确切的问题.

Currently the cyclic dependent imports are returning undefined values, Without telling the exact issue.

谢谢!

推荐答案

一个简单的解决方案是使用 madge 包以检查任何 javascript 项目中的循环依赖项.

one simple solution is using madge package to check the circular dependencies in any javascript project.

在项目文件夹中运行以下命令

run the below command in project folder

<代码>madge --circular --extensions js 应用程序/

这篇关于如何检测本机反应中的循环依赖导入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆