react-native-fast-rsa icon indicating copy to clipboard operation
react-native-fast-rsa copied to clipboard

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

Open ElielC opened this issue 1 year ago • 1 comments

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 avatar May 14 '24 21:05 ElielC

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

ElielC avatar May 15 '24 13:05 ElielC