How to run react native custom library inside react native project without publishing to npm? Local setup steps are not working. #44611
Labels
Resolution: Issue in another tool or repo
An issue that was opened against React Native but in reality is affecting another tool or library
Description
I have followed all the steps to create a native custom library using 'create-react-native-library' but its example app is not running. To check this locally I have created a new React-native app and then followed local library setup to check package changes. But getting the following errors when implemented local library setup:
error: Error: Unable to resolve module react/jsx-runtime from /Users/archanasharma/Documents/Workspace/reactjs/MyApps-Apps/package-practice/rnTest/node_modules/react-native/Libraries/Components/ActivityIndicator/ActivityIndicator.js: react/jsx-runtime could not be found within the project or in these directories:
node_modules/react-native/node_modules
node_modules
And to do this I have followed the following steps:
"my-library": "file:../myLibrary"
Please suggest the accurate custom library building steps using npm and how to link locally.
Steps to reproduce
"my-library": "file:../myLibrary"
React Native Version
0.74.1
Affected Platforms
Runtime - Android, Runtime - iOS, Build - MacOS
Output of
npx react-native info
Stacktrace or Logs
Reproducer
test
Screenshots and Videos
not having right now
The text was updated successfully, but these errors were encountered: