benawad / benawad/react-native-web-series

Adding additional packages to common makes react-native build fail

Open
#13 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
158
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Hi Ben,

First of all thanks a lot for making the video series, it saved me a lot of time fiddling with configurations. An issue that I keep having though is that if I add additional packages to the common folder (let's say mobx-react-lite for example) The react native build will fail with the following message:
![image](https://user-images.githubusercontent.com/31688709/62427514-7d2eb800-b6f4-11e9-8e7e-540f84dbb4b4.png)

It is actually present in:
`/Users/dennis/Documents/minibrew-rnw-poc/node_modules`

If I add the packages to the app package.json and set it to not hoist it will build succesfully. Have you ever seen this issue or do you know how to solve this?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the React Native build with an additional package such as mobx-react-lite in the common folder, then compare the common and app package.json hoisting behavior and the reported node_modules location. Done means the React Native build succeeds with the package declared in common without requiring it to be added separately to the app package.json.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
build-system, mobile-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.