Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.46 rc.2 Error: Couldn't find preset "env" relative to directory #14741

Closed
compojoom opened this issue Jun 27, 2017 · 2 comments
Closed

0.46 rc.2 Error: Couldn't find preset "env" relative to directory #14741

compojoom opened this issue Jun 27, 2017 · 2 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@compojoom
Copy link
Contributor

Hey guys,
I'm updating a project to 0.46 and I ran in several issues. I tried to reproduce them on a new app with success

I created a new app with:
react-native init rn46crash --version react-native@0.46.0-rc.2

Everything went fine. When I tried to start the app with xcode, the app is building fine, but the packager runs in the following error:

/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328
        throw e;
        ^

Error: Couldn't find preset "env" relative to directory "/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/regenerator-transform" (While processing preset: "/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-preset-react-native/index.js")
    at /Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-core/lib/transformation/file/options/option-manager.js:293:19
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-core/lib/transformation/file/options/option-manager.js:275:20)
    at OptionManager.mergePresets (/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-core/lib/transformation/file/options/option-manager.js:264:10)
    at OptionManager.mergeOptions (/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-core/lib/transformation/file/options/option-manager.js:249:14)
    at OptionManager.init (/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-core/lib/transformation/file/options/option-manager.js:368:12)
    at compile (/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-register/lib/node.js:103:45)
    at loader (/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-register/lib/node.js:144:14)
    at Object.require.extensions.(anonymous function) [as .js] (/Users/xxx/Documents/Development/Apps/rn-46-crash/rn46crash/node_modules/babel-register/lib/node.js:154:7)
    at Module.load (module.js:503:32)
Process terminated. Press <enter> to close the window

I created a repository with the issue:
compojoom/rn46crash@6f2df82 - this commit crashes

This one is fine:
compojoom/rn46crash@9e3672d - I've renamed .babelrc and it's being used.

@AndreyKozlov1984
Copy link

I have a similar issue - the project was working, I decided to remove all node_modules to check that all works well, then started to get those messages.

option a) - downgrade to 0.45
option b) (Although did not work) - run react-native start in one tab first, and then run react-native run-ios in the other tab

@grabbou
Copy link
Contributor

grabbou commented Jul 5, 2017

Duplicate of #14530

@grabbou grabbou closed this as completed Jul 5, 2017
@facebook facebook locked as resolved and limited conversation to collaborators Jul 5, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

4 participants