Skip to content

New architecture codegen not working and wrong imports  #669

Description

@gastonmorixe

Description

Similar to #662 #667 #628

In my case npx not found. Used RCT_NEW_ARCH_ENABLED=1 pod install for new arch.

My work around was removing the pre-action build script and calling it manually from the terminal

$ npx bob build --target codegen

Then I had a build error ComponentDescriptors.h not found. I solved it with:

+#import <ComponentDescriptors.h>
+#import <EventEmitters.h>
+#import <Props.h>
+#import <RCTComponentViewHelpers.h>
-#import <react/renderer/components/RNTwilioVideoWebrtcProViewSpec/ComponentDescriptors.h>
-#import <react/renderer/components/RNTwilioVideoWebrtcProViewSpec/EventEmitters.h>
-#import <react/renderer/components/RNTwilioVideoWebrtcProViewSpec/Props.h>
-#import <react/renderer/components/RNTwilioVideoWebrtcProViewSpec/RCTComponentViewHelpers.h>

Now it builds! :rock

image

Packages

  • create-react-native-library
  • react-native-builder-bob

Selected options

❯ npx create-react-native-library@latest react-native-twilio-video-webrtc-pro
create-react-native-library@0.42.2

✔ What is the name of the npm package? … react-native-twilio-video-webrtc-pro
✔ What is the description for the package? … Twilio Video WebRTC for React Native.
✔ What is the name of package author? … Gaston Morixe
✔ What is the email address for the package author? … gaston@gastonmorixe.com
✔ What is the URL for the package author? … https://github.com/gastonmorixe
✔ What is the URL for the repository? … https://github.com/gastonmorixe/react-native-twilio-video-webrtc-pro
✔ What type of library do you want to develop? › Fabric view with backward compat
✔ What type of example app do you want to create? › Vanilla
✔ Project created successfully at react-native-twilio-video-webrtc-pro!

Link to repro

https://github.com/gastonmorixe/react-native-twilio-video-webrtc-pro

Environment

System:
OS: macOS 15.2
CPU: (10) arm64 Apple M1 Max
Memory: 257.14 MB / 32.00 GB
Shell:
version: 3.7.1
path: /opt/homebrew/bin/fish
Binaries:
Node:
version: 22.9.0
path: ~/.local/state/fnm_multishells/63343_1729973623280/bin/node
Yarn:
version: 3.6.1
path: ~/.local/state/fnm_multishells/63343_1729973623280/bin/yarn
npm:
version: 10.9.0
path: ~/.local/state/fnm_multishells/63343_1729973623280/bin/npm
Watchman:
version: 2024.10.21.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /Users/gaston/.gem/ruby/3.3.0/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.1
- iOS 18.1
- macOS 15.1
- tvOS 18.1
- visionOS 2.1
- watchOS 11.1
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Xcode:
version: 16.1/16B40
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 3.3.5
path: /Users/gaston/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.0-alpha.2
wanted: 15.0.0-alpha.2
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.0
wanted: 0.76.0
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions