microsoft / microsoft/react-native-windows
MSBuild scanning makes it difficult to develop and test a module's example
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
For native modules, a common repo structure is having the module's example in the repo's ./example/ path, installing the module in the example through yarn add ...
When developing and testing the application at the same time, this causes a second version of react-native-windows to be copied from ./node_modules/react-native-windows to ./example/node_modules/{module_name}/node_modules/react-native-windows, which conflicts with ./example/node_modules/react-native-windows when building the example.
The current workaround is to delete ./example/node_modules/{module_name}/node_modules/ manually when yarn gets it, but it's hard to understand where the error is coming from at first.
It'd be good if it was possible to avoid it.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the native module layout described in the issue: ./example/, yarn add .., and the nested node_modules/react-native-windows copy. Start by examining how MSBuild scans these dependency paths; done means the example can build without the duplicate react-native-windows copy conflicting with ./example/node_modules/react-native-windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, react-native
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100