npm 中文文档 npm 中文文档
指南
npmjs.com (opens new window)
指南
npmjs.com (opens new window)
  • 快速入门

    • npm 是什么?
    • npm 安装和更新
    • npm 防止权限错误
    • npm package.json 文件
    • npm 安装包
    • npm 更新包
    • npm 卸载包
    • npm 创建 Node.js 模块
    • npm 发布和更新包
    • npm 使用语义化版本
    • npm 使用 Dist-tags 标记包
    • npm 包和模块的了解
  • 命令行
  • 配置 npm

Bugsnag error monitoring & reporting for JavaScript


Automatically detect JavaScript errors in the browser, Node.js and React Native, with plugins for React, Vue, Angular, Express, Restify and Koa. Get cross-platform error detection for handled and unhandled errors with real-time error alerts and detailed diagnostic reports.

Learn more about JavaScript error reporting and React Native error reporting from Bugsnag.

This is a monorepo (managed with Lerna containing our universal error reporting client @bugsnag/js, and our React Native client @bugsnag/react-native, along with:

the core Bugsnag libraries for reporting errors (@bugsnag/core )
plugins for supporting various frameworks (e.g. @bugsnag/plugin-react )
plugins for internal functionality (e.g. @bugsnag/plugin-simple-throttle )

Etc. See packages for a full list of contents.

Getting started


Create a Bugsnag account
Complete the instructions in the integration guide
Report handled exceptions using Bugsnag.notify()
Customize your integration using the configuration options

Integrating with frameworks


Use the following plugins and guides to integrate Bugsnag with various frameworks.

Browser


Framework Bugsnag plugin Documentation
:--- :--- :---
Vue @bugsnag/plugin-vue Vue docs
React @bugsnag/plugin-react React docs
Angular @bugsnag/plugin-angular Angular docs

Desktop


Framework Bugsnag notifier Documentation
:--- :--- :---
Electron @bugsnag/electron Electron docs

Server


Framework Bugsnag plugin Documentation
:--- :--- :---
Koa @bugsnag/plugin-koa Koa docs
Express @bugsnag/plugin-express Express docs
Restify @bugsnag/plugin-restify Restify docs

Mobile


Framework Bugsnag notifier Documentation
:--- :--- :---
React Native @bugsnag/react-native React Native docs

Support


Check out the FAQ and configuration options
Search open and closed issues for similar problems
Report a bug or request a feature

Contributing


Most updates to this repo will be made by Bugsnag employees. We are unable to accommodate significant external PRs such as features additions or any large refactoring, however minor fixes are welcome. See contributing for more information.

Development quick start


  1. ``` shell
  2. # Clone the repository
  3. git clone git@github.com:bugsnag/bugsnag-js.git --recursive
  4. cd bugsnag-js

  5. # Install top-level dependencies
  6. npm i

  7. # Bootstrap all of the packages
  8. npm run bootstrap

  9. # Build the standalone notifiers and plugins
  10. npm run build

  11. # Run the unit tests
  12. npm run test:unit

  13. # Run tests for a specific package
  14. npm run test:unit -- --testPathPattern="packages/react-native"

  15. # Generate a code coverage report
  16. npm run test:unit -- --coverage

  17. # Run the linter
  18. npm run test:lint

  19. # Run the typescript compatibility tests
  20. npm run test:types
  21. ```

See contributing for more information.

License


All packages in this repository are released under the MIT License. See LICENSE.txt for details.
Last Updated: 2023-05-15 10:22:02