jerson / react-native-fast-rsa

RSA for react native made with golang for fast performance
https://www.npmjs.com/package/react-native-fast-rsa
MIT License
35 stars 11 forks source link

Cannot find source file jsi.cpp in monorepo with hoisted packages #89

Open ElielC opened 5 months ago

ElielC commented 5 months ago

Hello, i have a monorepo where i use expo(SDK 51) in local app development.

Because this recomendation i have node-linker=hoisted in my .npmrc.

Running npx expo run:android then results in this error message: `CMake Error at CMakeLists.txt:18 (add_library): Cannot find source file:

  /Users/ecsilveira/Desktop/www/my-project/examples/expo/node_modules/react-native/ReactCommon/jsi/jsi/jsi.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h
.hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc

CMake Error at CMakeLists.txt:18 (add_library): No SOURCES given to target: fast-rsa`

The react native package is not inside expo/node_modules, but my-project/node_modules.

Removing node-linker=hoisted results in correct compilation but the app crashes immediately.

I'm currently attempting to resolve the issues created by remover the hoisted behavior, but i`d like to ask if anyone has any suggestions.

Thanks.

ElielC commented 5 months ago

I have found a workaround by manually changing the cmake argument for node_modules in the package build.gradle utilizing pnpm`s patch command.