【React Native】在React Native項目中使用rollbar-react-native記錄


  1、Debug模式下會報如下錯誤:

  錯誤:Invariant Violation:Calling synchronous methods on native modules is not supported in Chrome.

  Consider providing alternative methods to expose this method in debug mode.e.g.bu exposing constants ahead-of-time.

  解決:Debug模式下,注釋以下代碼:

import { Client } from 'rollbar-react-native';
const rollbar = new Client('6628ae4**********575f8e2f267');

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM