Doesn't seem to work with react native #1

Open
opened 7 years ago by someone235 · 2 comments

The react native packager gives me this error:

transformed 430/479 (90%)(node:4759) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1332): SyntaxError: TransformError: /path/to/projectLib/node_modules/unhandled-rejection/index.js: Couldn't find preset "es2015" relative to directory "/path/to/projectLib/node_modules/unhandled-rejection"
The react native packager gives me this error: transformed 430/479 (90%)(node:4759) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1332): SyntaxError: TransformError: /path/to/projectLib/node_modules/unhandled-rejection/index.js: Couldn't find preset "es2015" relative to directory "/path/to/projectLib/node_modules/unhandled-rejection"
Owner

I'm not familiar with the React Native packager, but chances are that you're trying to mistakenly transpile dependencies as well - and since they're installed in production mode, development dependencies (such as Babel presets) are not included.

The solution to this is probably to just disable transpiling on dependencies. This library is transpiled to ES5 before publication, so it's not really necessary anyway.

I'm not familiar with the React Native packager, but chances are that you're trying to mistakenly transpile dependencies as well - and since they're installed in production mode, development dependencies (such as Babel presets) are not included. The solution to this is probably to just disable transpiling on dependencies. This library is transpiled to ES5 before publication, so it's not really necessary anyway.
Owner

Just a quick ping - I've only just set up e-mail on here, so you probably wouldn't have received a notification for the above :)

Just a quick ping - I've only just set up e-mail on here, so you probably wouldn't have received a notification for the above :)
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: joepie91/node-unhandled-rejection#1
Loading…
There is no content yet.