{"action":"created","issue":{"url":"https://api.github.com/repos/airbrake/airbrake-js/issues/485","repository_url":"https://api.github.com/repos/airbrake/airbrake-js","labels_url":"https://api.github.com/repos/airbrake/airbrake-js/issues/485/labels{/name}","comments_url":"https://api.github.com/repos/airbrake/airbrake-js/issues/485/comments","events_url":"https://api.github.com/repos/airbrake/airbrake-js/issues/485/events","html_url":"https://github.com/airbrake/airbrake-js/issues/485","id":374437422,"node_id":"MDU6SXNzdWUzNzQ0Mzc0MjI=","number":485,"title":"React Native - Unable to resolve 'os'","user":{"login":"roancoetzee","id":2031707,"node_id":"MDQ6VXNlcjIwMzE3MDc=","avatar_url":"https://avatars3.githubusercontent.com/u/2031707?v=4","gravatar_id":"","url":"https://api.github.com/users/roancoetzee","html_url":"https://github.com/roancoetzee","followers_url":"https://api.github.com/users/roancoetzee/followers","following_url":"https://api.github.com/users/roancoetzee/following{/other_user}","gists_url":"https://api.github.com/users/roancoetzee/gists{/gist_id}","starred_url":"https://api.github.com/users/roancoetzee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roancoetzee/subscriptions","organizations_url":"https://api.github.com/users/roancoetzee/orgs","repos_url":"https://api.github.com/users/roancoetzee/repos","events_url":"https://api.github.com/users/roancoetzee/events{/privacy}","received_events_url":"https://api.github.com/users/roancoetzee/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-10-26T15:34:45Z","updated_at":"2019-02-15T11:54:02Z","closed_at":"2019-02-15T11:54:02Z","author_association":"NONE","body":"Using [this](https://airbrake.io/docs/installing-airbrake/installing-airbrake-in-a-react-app/) guide from the documentation.\r\n\r\nImport it like this \r\n```\r\nimport { Component } from 'react'\r\n\r\nimport AirbrakeClient from 'airbrake-js'\r\n\r\nexport default class ErrorBoundary extends Component {\r\n  constructor(props) {\r\n    super(props)\r\n    this.airbrake = new AirbrakeClient({\r\n      projectId: 1,\r\n      projectKey: 'excluded_for_example'\r\n    })\r\n  }\r\n\r\n  componentDidCatch(error, info) {\r\n    this.airbrake.notify({\r\n      error: error,\r\n      params: { info: info }\r\n    })\r\n  }\r\n\r\n  render() {\r\n    return this.props.children\r\n  }\r\n}\r\n```\r\n\r\nthen wrapped my `RootComponent` in `ErrorBoundary` like this\r\n```\r\n        <ErrorBoundary>\r\n          <RootContainer />\r\n        </ErrorBoundary>\r\n```\r\nI get the following error on both Android and iOS\r\n\r\n```\r\nerror: bundling failed: Error: Unable to resolve module `os` from `/Users/{...}/node_modules/airbrake-js/dist/client.js`: Module `os` does not exist in the Haste module map\r\n\r\nThis might be related to https://github.com/facebook/react-native/issues/4968\r\nTo resolve try the following:\r\n  1. Clear watchman watches: `watchman watch-del-all`.\r\n  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.\r\n  3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.  4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.\r\n    at ModuleResolver.resolveDependency (/Users/{...}/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:167:1306)\r\n    at ResolutionRequest.resolveDependency (/Users/{...}/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:80:16)\r\n    at DependencyGraph.resolveDependency (/Users/{...}/node_modules/metro/src/node-haste/DependencyGraph.js:237:485)\r\n    at Object.resolve (/Users/{...}/node_modules/metro/src/lib/transformHelpers.js:116:25)\r\n    at dependencies.map.result (/Users/{...}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:298:29)\r\n    at Array.map (<anonymous>)\r\n    at resolveDependencies (/Users/{...}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:294:16)\r\n    at /Users/{...}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:159:33\r\n    at Generator.next (<anonymous>)\r\n    at step (/Users/{...}/node_modules/metro/src/DeltaBundler/traverseDependencies.js:239:307)\r\n```\r\nairbrake-js - 1.5.0\r\n\r\nAny ideas?"},"comment":{"url":"https://api.github.com/repos/airbrake/airbrake-js/issues/comments/464020535","html_url":"https://github.com/airbrake/airbrake-js/issues/485#issuecomment-464020535","issue_url":"https://api.github.com/repos/airbrake/airbrake-js/issues/485","id":464020535,"node_id":"MDEyOklzc3VlQ29tbWVudDQ2NDAyMDUzNQ==","user":{"login":"vmihailenco","id":290976,"node_id":"MDQ6VXNlcjI5MDk3Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/290976?v=4","gravatar_id":"","url":"https://api.github.com/users/vmihailenco","html_url":"https://github.com/vmihailenco","followers_url":"https://api.github.com/users/vmihailenco/followers","following_url":"https://api.github.com/users/vmihailenco/following{/other_user}","gists_url":"https://api.github.com/users/vmihailenco/gists{/gist_id}","starred_url":"https://api.github.com/users/vmihailenco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmihailenco/subscriptions","organizations_url":"https://api.github.com/users/vmihailenco/orgs","repos_url":"https://api.github.com/users/vmihailenco/repos","events_url":"https://api.github.com/users/vmihailenco/events{/privacy}","received_events_url":"https://api.github.com/users/vmihailenco/received_events","type":"User","site_admin":false},"created_at":"2019-02-15T11:54:02Z","updated_at":"2019-02-15T11:54:02Z","author_association":"MEMBER","body":"Closing as stale."}}
{"actor":{"display_login":"vmihailenco"}}