For local debug did you follow this guide How to debug your build locally / "It works on my Mac/PC but not on bitrise.io" ?
It’s quite important to start with a clean git clone - most of these issues are not related to bitrise at all, instead related to something not under version control, or a dependency which’s version is not locked in your project and your local dependency version is not the same what bitrise.io gets when it runs the dependency manager (e.g. npm install / pod install / …) to get your project’s dependencies.