Giter Site home page Giter Site logo

okwasniewski / react-native-monorepo Goto Github PK

View Code? Open in Web Editor NEW
10.0 10.0 3.0 422 KB

JavaScript 3.01% TypeScript 8.08% Ruby 3.18% Starlark 1.49% Java 38.61% Makefile 3.73% C++ 17.24% Shell 1.19% Objective-C 5.91% Objective-C++ 11.00% HTML 4.26% CSS 2.30%

react-native-monorepo's Introduction

Hi everyone ๐Ÿ‘‹

My name is Oskar and I'm 23 years old. I'm a Senior React Native Developer at callstack, OSS Contributor, and in my free time a cyclist ๐Ÿšด

Feel free to contact me here.

react-native-monorepo's People

Contributors

okwasniewski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-native-monorepo's Issues

Yarn install on clean repo results in error

Looks like when I do yarn install on clean project it has some problems with "postinstall" script of shared package:

rimraf dist && tsc
node:internal/modules/cjs/loader:988
throw err;
^

Error: Cannot find module '{path to project}\react-native-monorepo\node_modules\node_modules\rimraf\bin.js'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
error Command failed with exit code 1.

I don't understand why it has double node_modules/node_modules in the path

No bundle URL present

Followed the docs, but getting this error on iOS and a can't find index.js on Android.

Error: Unable to resolve module react-native from...

error: Error: Unable to resolve module react-native from /Users/me/projects/monorepo/apps/mobile/index.tsx: react-native could not be found within the project or in these directories:
node_modules
../../node_modules
../../../../../node_modules
3 | */
4 |

5 | import { AppRegistry } from "react-native";
| ^
6 | import App from "./src/pages/App";
7 | import { name as appName } from "./app.json";
8 |

Happens when running 'npx react-native run-ios' from mobile. What could be happening here? yarn install worked fine, and no issues when installing the podfiles. Same issue when following blog instructions from scratch, and from cloning. Is it some M1 architecture issue?

Unable to access @example-app/shared in RN CLI

error: Error: Unable to resolve module @example-app/shared from /home/fa80mlhr3/Git/react-native-monorepo-main/packages/mobile/App.tsx: @example-app/shared could not be found within the project or in these directories:
node_modules
../../node_modules

image
image

main.jsbundle doest not exist

Hey, thanks for the very detailed tutorial about how to setup a monorepo. I'm working on a personal project, just for fun and to improve some skills, and decided to try this monorepo approach so I can share typescript interfaces between mobile and server.

I'm using react-native 0.71.3 and everything is working in development mode.

Today I decided to tried to deploy into my iPhone with a release build configuration, to measure FlatList performance, but I got this error:

File /<path>/Products/Release-iphoneos/RNTest.app/main.jsbundle does not exist. 
This must be a bug with React Native, please report it here: https://github.com/facebook/react-native/issues

Wonder if you ever had this problem whit the most recent version of RN.
It feels like a problem with the monorepo structure and RN not finding the file.

I found some posts from people having this problem with older versions, but a lot of RN build configs changed since then.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.