Comments (5)
I also ran into this problem with CircleCI. It's expecting es5 source and gets an error on the es6 import statement in node_modules/bugsnag-react-native/index.js.
I'll try working around it by testing for the circleci environment variables and not importing bugsnag for now.
from bugsnag-react-native.
Thanks for the report, @henrikra. Can you share your .babelrc
? Maybe there is a configuration option which would help here.
from bugsnag-react-native.
My .babelrc
has basic conf: {"presets": ["react-native"]}
Another way we solved this was by ignoring bugsnag-react-native
import when testing. Adding custom module loader to setup.js
:
require('react-native-mock/mock');
const m = require('module');
global.__DEV__ = true;
const originalLoader = m._load;
m._load = function hookedLoader(request, parent, isMain) {
if (request === 'bugsnag-react-native') {
return {};
}
return originalLoader(request, parent, isMain);
};
This will return empty object when bugsnag-react-native
is being imported otherwise it loads modules as normal :)
from bugsnag-react-native.
Hello guys, I'm having the same issue with Jest. I have the same .babelrc file as @henrikra
We manually mocked bugsnag so we don't get the issue anymore:
let bugsnag = {
leaveBreadcrumb: (message, metadata) => {
console.log({message, ...metadata});
}
};
if (envData.environment !== 'DEV') {
const bugsnagRN = require("bugsnag-react-native");
const configuration = new bugsnagRN.Configuration("[...]");
configuration.releaseStage = envData.environment;
bugsnag = new bugsnagRN.Client(configuration);
}
@wordofchristian had the same issue here: #10
from bugsnag-react-native.
Experiencing the same issue with sdk v2.2.3
from bugsnag-react-native.
Related Issues (20)
- Ask for user confirmation in registerBeforeSendCallback HOT 1
- Intermittent build failure on :bugsnag-react-native:verifyReleaseResources Gradle task HOT 2
- New version utilising new JS and Android versions? HOT 3
- the uploaded source map not getting applied HOT 1
- iOS: Definition of '' must be imported from module HOT 6
- Upload Hermes sourcemaps generated by CodePush HOT 1
- Unhandled crashes not sent. (iOS) HOT 2
- bugsnag-react-native does not support bugsnag-cocoa 6.0 HOT 6
- iOS Build Error: Include of a non-modular header inside framework module 'BugsnagReactNative.Bugsnag' HOT 6
- iOS Library misbehaves when dropping breadcrumbs HOT 4
- Cycle in dependencies between targets 'BugsnagReactNative' and 'FBSDKCoreKit'; HOT 2
- App crash during launch java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader HOT 4
- Files that shouldn't be in your npm package HOT 1
- Sourcemap path in case of android flavor builds HOT 3
- RN62.0: Multiple targets match implicit dependency for linker flag '-lBugsnagReactNative HOT 4
- Missing TS declarations '@bugsnag/react-native' ^7.3.1 HOT 4
- Missing TS definition for `codeBundleId` in Bugsnag.start() HOT 4
- Bugsnag Android Dependency Update HOT 1
- Please add back JS releaseStage and appVersion HOT 1
- Ability to set `errorClass` in new version? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bugsnag-react-native.