-
-
Notifications
You must be signed in to change notification settings - Fork 180
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
[tvOS] - Xcode build failing with babel/webpack/metro related errors #1754
Comments
@iAMkVIN-S thanks for very detail description, will look into it and try to reproduce, as for now I see you are asking for demo app, so in renative monorepo there are 2 app packages, one is app-harness, the other is template-starter |
@pauliusguzas Thank you for your prompt reply. I will compare the As added information: Please let me know how I can assist further in fixing the issue 🙏 |
@pauliusguzas Following up with last night's response: I have tried matching the Xcode builds are still failing with the same set of errors. |
I have the same issue alas. Anyone figured it out already? I can run but not build |
@ChristopheSnacken - Out of curiosity, did you get the same trail of errors/fixes as above? |
With me it's mainly that metro is not picking up on .tvos extension. He is going for the standard index.js file instead of the index.tvos.js file. When I use the "run" instead of "build" command, and without the "-s release" it picks up the correct file extensions. `None of these files exist :
|
@iAMkVIN-S Hello. I can't reproduce this. Could you create a minimal reproducible example to help? Note: entryFile points to the index.js file in the root of the project. Why did you try to change that? |
Describe the bug
When trying to build for tvOS, the renative build succeeds, but the Xcode archive fails with syntax errors that seem related to babel/webpack/metro. However, no custom babel/webpack configuration has been added on our side.
tvOS simulator works fine.
AndroidTV simulator works fine.
AndroidTV build works fine.
To Reproduce
1.
npx rnv build
2. Select tvos
3. When build succeeds, open RNVApp.xcworkspace
4. In Xcode, on the middle navigation menu, select target RNVApp-tvOS
5. At the top navigation menu, select tab General
6. Set the Display Name , Bundle Identifier, Version and Build
7. At the top navigation menu, select tab Signing & Capabilities and set your Team
8. Using the MacOS toolbar, select Product and then Archive to start the Xcode build
The build will fail with the following error:
error SyntaxError: /Users/kevin/Documents/REPOS/jimmy/jstv/js-tv/src/app/index.tsx: Support for the experimental syntax 'jsx' isn't currently enabled (32:5):
Upon following the instructions in the error and looking for a solution, there seems to be two steps to do:
9. Add a babel presets to your devDependencies using
npm i @babel/preset-react --save-dev
andnpm i @babel/preset-flow --save-dev
10. Modify your babel.config.js :
11. Rebuild with steps 1 to 8
The build will now fail with the following error:
error SyntaxError: /Users/kevin/Documents/REPOS/jimmy/jstv/js-tv/node_modules/react-native/index.js: Unexpected keyword 'typeof'. (14:7)
Upon following the instructions in the error and looking for a solution, there seems to be one step to do:
12. Modify your webpack.config.json :
13. Rebuild with steps 1 to 8
The build will now fail with the following error:
error Unable to resolve module missing-asset-registry-path from /Users/kevin/Documents/REPOS/jimmy/jstv/js-tv/src/assets/defaultThumbnail.jpg: missing-asset-registry-path could not be found within the project or in these directories:
Upon following the instructions in the error and looking for a solution, there seems to be two steps to do:
14: Add a metro dependencies
npm i @react-native/metro-config --save-dev
andnpm i react-native-svg-transformer --save-dev
15: Modify your modify.config.json :
16. Rebuild with steps 1 to 8
The build will now fail with the following error:
error node_modules/react-native-svg/src/elements/Symbol.tsx: /Users/kevin/Documents/REPOS/jimmy/jstv/js-tv/node_modules/react-native-svg/src/elements/Symbol.tsx: We don't know what to do with this node type. We were previously a Statement but we can't fit in here?.
Upon following the instructions in the error and looking for a solution, there seems to be one step to do:
17: Install missing dependencies from step 9 with
npm i @babel/preset-env --save-dev
andnpm i @babel/preset-typescript --save-dev
(my bad, we added them in the babel.config.json and I had not installed them)18. Rebuild with steps 1 to 8
The build will now fail with the following error:
private properties are not supported
At this point, I cannot find any working solutions, and feel as if I don't want to go too far off course from the default Renative setup. Any suggestions? How should the tvOS build normally go? Does renative have a functional demo app to compare to?
Expected behavior
Xcode archive should succeed without any build errors.
Desktop and other information:
My renative.json
/platforms/tvos
:The text was updated successfully, but these errors were encountered: