use turboModule in app not as a libray in node_modules folder work fail, js file can not find the turboModule #44273
Labels
Needs: Triage 🔍
Newer Patch Available
Type: New Architecture
Issues and PRs related to new architecture (Fabric/Turbo Modules)
Description
1.use newArch in app
2.create a turboModule in app,but no as a libray in external folder ,then yard add into node_module to be a library(as a library can not use app src and feacture ).
3.modify the root package.json to add codegenConfig
add js file to Define Specs in JavaScript
./gradlew generateCodegenArtifactsFromSchema to gererate jni files
create implement turboModule and TurboReactPackage
add TurboReactPackage to ReactNativeHost packagelist
4. modify App.tsx, import the turboModule, add add a button, on press click to call turboModule funcation, crash
the error is can find the turboModule
Steps to reproduce
React Native Version
0.73.7
Affected Platforms
Runtime - Android, Build - Windows
Areas
TurboModule - The New Native Module System
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/ncwuguowei/reproducer-react-native
Screenshots and Videos
The text was updated successfully, but these errors were encountered: