devour-client icon indicating copy to clipboard operation
devour-client copied to clipboard

react-native: TransformError: Couldn't find preset es2015

Open jpaas opened this issue 9 years ago • 3 comments

I'm trying to use v.1.3.9 in a react-native(0.35.0-rc.0) project but I get an error that it can't find the es2015 preset. Any ideas?

jpaas avatar Oct 01 '16 16:10 jpaas

I have another error (react-native 0.36.0):

babelhelpers.typeof is not a function

superp avatar Nov 17 '16 15:11 superp

The only solution I was able to find for this problem was to add babel-preset-es2015 to the dependencies of my react-native package.json.

Once that was fixed, it revealed the babelhelpers.typeof error mentioned by @superp. This appears to be a react-native bug, which as far as I can tell has not yet been fixed in RN 0.40. But there is a pull request for it. https://github.com/facebook/react-native/pull/11093/files?diff=unified

jpaas avatar Jan 04 '17 20:01 jpaas

It is listed as a general bugfix in 0.41, but it has not been released yet. https://github.com/facebook/react-native/releases/tag/v0.41.0-rc.0

Until then I've decided to use uncompiled version of devour so it could be compiled by my react-native app babel setup. babel-resent-es2015 is still required for me though.

import JsonApi from 'devour-client/src';

ox-michaelradionov avatar Feb 02 '17 09:02 ox-michaelradionov