microsoft / microsoft/react-native-windows

MSBuild scanning makes it difficult to develop and test a module's example

Open
#8,104 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Developer Experience question Workstream: Module Support
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.