[NO QA] Fix: react-native "command not found" error#10325
Merged
Conversation
5dcd52f to
9b8c063
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Some clarity on npx: - it works a bit differently in npm 6 (which we currently use) - namely it downloads and executes a package without the user confirming first. - it would not download a package if it's available locally in node_modules/.bin - right now it downloads react-native every time because it's missing from .bin - it works pretty much like npm run Using npx does not mean "always run with the latest version" of the given package, but "use any local version we have (.bin), or download it otherwise) npx would use the latest version only when we don't have a package installed locally This means that adding the npx prefix would help fix the problem quickly now And would make no difference when we switch to newer node and npm later, because the react-native package would be avaialable in node_modules/.bin (The problem is `react-native` is not being recognized as installed in package scripts. The source of the problem is using npm6 which is now a bit obsolete) (More details in this slack thread: https://expensify.slack.com/archives/C01GTK53T8Q/p1659765865205259)
9b8c063 to
ec9d33d
Compare
Contributor
Author
|
✔️ Ready for Review |
AndrewGable
approved these changes
Aug 9, 2022
srikarparsi
approved these changes
Aug 9, 2022
Contributor
|
Tested the changes and they seem to be working as expected. |
roryabraham
approved these changes
Aug 9, 2022
Contributor
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
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.
Details
Fixes an issue with

react-nativecommand not being recognized in package.json scriptsMore details in this slack thread: https://expensify.slack.com/archives/C01GTK53T8Q/p1659765865205259
Fixed Issues
$ N/A
Tests
react-native)npm run androidnpm run iosnpm startnpm run ipadnpm run ipad-smnpm run cleanPR Review Checklist
Contributor (PR Author) Checklist
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)PR Reviewer Checklist
The Contributor+ will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issuessection aboveTestssectionQA stepssectiontoggleReportand notonIconClick).src/languages/*filesSTYLE.md) were followedAvatar, I verified the components usingAvatarhave been tested & I retested again)/** comment above it */displayNamepropertythisproperly so there are no scoping issues (i.e. foronClick={this.submit}the methodthis.submitshould be bound tothisin the constructor)thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)Avataris modified, I verified thatAvataris working as expected in all cases)QA Steps
Screenshots
Web
Mobile Web
Desktop
iOS
Android
cc @AndrewGable