rnpm-plugin-windows fails when using npm#3998
Merged
acoates-ms merged 3 commits intomicrosoft:masterfrom Jan 31, 2020
Merged
Conversation
kmelmon
reviewed
Jan 30, 2020
| const chalk = require('chalk'); | ||
| const execSync = require('child_process').execSync; | ||
| const path = require('path'); | ||
| const prompt = require('@react-native-community/cli/build/tools/generator/promptSync').default(); |
Contributor
There was a problem hiding this comment.
vnext\local-cli\generator-common\index.js also require's and uses this module. Does that need to be changed as well? prompts looks better anyway.
Contributor
Author
There was a problem hiding this comment.
Thats in react-native-windows which declares the cli dep already.
Contributor
There was a problem hiding this comment.
That dependency is about to be removed when we move to 61
Contributor
Author
There was a problem hiding this comment.
If its removed the generator will have to be updated to not use it.
I expect that over time we will require the cli dependency as we work to properly implement auto-linking etc -- so maybe we should just keep the dependency and update it to match the same version range that react-native itself uses in 61.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #3862
rnpm-plugin-windows was using a dependency that it wasn't declaring. Rather than having rnpm declare a specific react-native-community\cli dependency, which can cause issues since different RN versions require different versions of the CLI. I changed the dependency to use another package.
This also changes the CLI to only prompt the vnext/legacy prompt when used against RN 0.59. Since thats the only version that has a good legacy and vnext version.
If the user it using >=0.60 we will automatically use the vnext version.
Microsoft Reviewers: Open in CodeFlow