TransformError with babel-preset-react-native/index.js -


i'm brand new react-native, , trying render first bit of text on screen.

when run react-native run-ios , click sample app, see following error:

transformerror enoent: no such file or directory, open '.../albums/node_modules/babel-preset-react-native/index.js' while processing preset '.../babel-preset-react-native/index.js' rctfatal rctcxxbridge handleerror

index.js exist in project, following code:

'use strict';
module.exports = require('./configs/main');

so far, have tried following:

1) re-installing npm babel-preset-react-native

2) using yarn remove , re-add babel-preset-react-native
yarn remove babel-preset-react-native
yarn add babel-preset-react-native@2.1.0

3) deleting babel.rc entirely

nothing has worked. eager hear advice , suggestions other things try.

this bug in new version of babel-preset-react-native added automatically after run react-native init command

please take @ github issue https://github.com/facebook/react-native/issues/15513

workaround, try change version:

yarn remove babel-preset-react-native yarn add babel-preset-react-native@2.1.0 

if that's not work you, try remove trailing comma @ node_modules/babel-preset-react-native/configs/main.js @ code below

https://github.com/facebook/react-native/blob/6ad7e8281b37ee2ce6425363c0b17420d056807a/babel-preset/configs/main.js#l40 , re-run app


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -