react-native: Can't run tvOS target for newly generated RN project

Description

Basic iOS target runs successfully I’ve created basic RN project with the help of react-native-cli and tried to run tvOS target, but got the following issue:

AppleTvSample/node_modules/react-native/ReactCommon/jschelpers/Value.cpp:3:10: 'folly/json.h' file not found

!!!RNTester application fails for the tvOS target too with the error above

Reproduction Steps

> react-native init sample_program
> cd sample_program
> open ios/sample_program.xcodeproj
> change Run Target to tvOS. Run it

Sample Code

AppleTvSample

Solution

Can’t say for sure, because i’m not so familiar with XCode and Objective-C

Additional Information

  • React Native version: 0.45.1
  • react-native-cli: 2.0.1
  • Platform: tvOS
  • Development Operating System: macOS 10.11.6
  • Build tools: Xcode 8.2.1

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 10
  • Comments: 22 (1 by maintainers)

Most upvoted comments

@vrudikov, @speedandfunction-anri, @speedandfunction-helen, @knot123 hi guys.

it’s confusing as hell but creating and ejecting an app with create-react-native-app resolved this one for me.

  • npm i create-react-native-app -g
  • create-react-native-app MyAwesomeProject
  • cd MyAwesomeProject
  • npm run eject

lulz 😅

@altayaydemir I tried but same error appears.

‘folly/json.h’ file not found

This issue appears to now be resolved. Now if you run react-native init the project is generated using react-native 0.46.4 in which this issue appears to be fully resolved.

I tried to remove node, yarn etc nothing changed. Until I did the react-native init in the folder I mentioned above. So it could weird permissions or something not supported in the path. I didn’t try in other locations.

Any news? I’m having the same issue

react-native-cli: 2.0.1 react-native: 0.45.1 Build tools: Xcode 8.3.3 NPM: 4.6.1 Yarn: 0.27.5 Development Operating System: 10.12.5

@ndcollins @knot123 Hi, all. It works for me. Guys, please post your environment specs as I did above

@knot123 @altayaydemir I also get the same error that ‘folly/json.h’ file not found.

@altayaydemir Cool! Thanks for sharing!