Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npmPackageName should be resolved from project root, not from cli-plugin-metro #1996

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

acoates-ms
Copy link
Contributor

Summary:

When resolving npmPackageName currently, we are resolving it from the cli-plugin-metro package. But cli-plugin-metro does not have a direct dependency on any of the out of tree platform packages (say react-native-windows or react-native-macos). Instead we should be resolving npmPackageName from the project root, which will have the out of tree package as a dependency.

This generally works today because so many package managers hoist everything and so packages can resolve other packages that are used in the repo even if they are not declared as dependencies. But some package managers are moving to be more strict about this.

Test Plan:

Checklist

  • Documentation is up to date to reflect these changes.
  • Follows commit message convention described in CONTRIBUTING.md

@robhogan robhogan self-assigned this Jul 3, 2023
@thymikee thymikee requested review from huntie and robhogan July 4, 2023 07:31
Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Mind run the linter to fix formatting?

@acoates-ms
Copy link
Contributor Author

Done. I also bumped deasync in the lock file, since the older version means yarn fails to work on windows machines that have the most recent version of VisualStudio installed.

@thymikee thymikee merged commit 548e2bb into main Jul 11, 2023
7 checks passed
@thymikee thymikee deleted the initcorefromroot branch July 11, 2023 16:18
thymikee pushed a commit that referenced this pull request Jul 11, 2023
…gin-metro (#1996)

* fix: npmPackageName should be resolved from project root, not from cli-plugin-metro

* fix linting

* Older deasync fails to yarn install on windows machines with newer visual studio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants