[HOLD] Use Node 16 and NPM 8 going forward#9867
Conversation
|
Ok seeing the same error locally as in tests: |
|
Seems like it's the same as this: react-navigation/react-navigation#9932 |
|
Ok now |
|
I will attempt to fix this warning before merge, but not sure it needs to block merge: |
|
Finally got GitHub actions happy here. There will probably be quite a few conflicts due to the nature of these changes, so I will resolve them all once we feel comfortable with the changes. I do still need to do some client testing since I upgraded a few node dependencies, so I will take off hold once this is ready. |
|
Seems like we have mismatching versions of |
|
Seems like the real reason for this web error is mentioned in this comment here: #8888 (comment) Something with |
|
OK so here is an interesting predicament.. Our My proposed solution would be:
Thoughts @roryabraham @marcaaron @alex-mechler @tgolen ? |
| "domhandler": "^4.3.0", | ||
| "dotenv": "^8.2.0", | ||
| "expensify-common": "git+https://github.com/Expensify/expensify-common.git#dfc17a33907dd487610cf1eeb6212f4d89b96b6f", | ||
| "expensify-common": "git+https://github.com/Expensify/expensify-common.git#7c81f4ef04c942ddf85c6fb0f600b4b9725014b5", |
There was a problem hiding this comment.
Note to self: Probably should revert this change
How hard would it be to update the fork to the latest and manually resolve conflicts to keep our copy/paste fixes while we wait for the upstream PR to be reviewed?
We should definitely do this 🙂 |
|
I don't think it would be extremely difficult to keep our repo up to date with the upstream changes, but it would still prevent M1 users from running on web until we figured out why our custom compile script is throwing hook errors. |
|
I am OK with that plan as it would put some urgency behind getting the fix merged for real. I read through this and it seems like our advice (but not policy?) is to merge the upstream into the fork? |
|
Looks like we tried to open a PR -> necolas/react-native-web#2151 But does not look like it got a response so we are probably taking the wrong approach. Have we tried to contact the maintainer? |
|
Alternative solution provided by @marcaaron as we were chatting, using |
I don't love how we have to recompile react-native-web every time we run an npm install. A couple alternatives would be:
Given that we already have a fork of react-native-web my recommendation would be that we publish it to npm and use it like any other package |
|
So how about an updated proposal:
|
|
Going to come back to this in smaller PRs. This has gotten way too big to do in one. |

Details
This introduces a change to force usage of node 16 and npm 8 in order to better support M1 machines.
When running
npm installon a machine with node 14 you will see this error:I will send out a
Action Requiredemail to internal employees in addition to posting a message in Slack for contributors.Fixed Issues
https://expensify.slack.com/archives/C01GTK53T8Q/p1657213944275459
Tests
npm installon an M1 and Intel machine- verify it installs ✅zshintegration for nvm and verify when changing directory intoAppyou see:PR 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)