Skip to content

fix(dev-middleware): fix react-native config failing in pnpm setups - #42907

Closed
tido64 wants to merge 1 commit into
mainfrom
tido/missing-ws
Closed

fix(dev-middleware): fix react-native config failing in pnpm setups#42907
tido64 wants to merge 1 commit into
mainfrom
tido/missing-ws

Conversation

@tido64

Copy link
Copy Markdown
Collaborator

Summary:

In a pnpm setup, react-native config fails to read react-native/react-native.config.js because ws was not installed:

% node --print 'require("react-native/react-native.config.js")'
node:internal/modules/cjs/loader:1137
throw err;
^
Error: Cannot find module 'ws'

Changelog:

[GENERAL] [FIXED] - fix react-native config failing in pnpm setups

Test Plan:

n/a

@tido64
tido64 requested review from huntie and robhoganFebruary 7, 2024 11:54
@facebook-github-botfacebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Microsoft Partner: Microsoft Partner labels Feb 7, 2024
```
% node --print 'require("react-native/react-native.config.js")'
node:internal/modules/cjs/loader:1137
throw err;
^
Error: Cannot find module 'ws'
```
@facebook-github-botfacebook-github-bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Feb 7, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@robhogan has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@robhoganrobhogan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks again!

@analysis-bot

Copy link
Copy Markdown
PlatformEngineArchSize (bytes)Diff
androidhermesarm64-v8a17,233,279-14
androidhermesarmeabi-v7an/a--
androidhermesx86n/a--
androidhermesx86_64n/a--
androidjscarm64-v8a20,600,096+1
androidjscarmeabi-v7an/a--
androidjscx86n/a--
androidjscx86_64n/a--

Base commit: 8da1da2
Branch: main

@facebook-github-botfacebook-github-bot added the Merged This PR has been merged. label Feb 7, 2024
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@robhogan merged this pull request in 8f4f09b.

@tido64
tido64 deleted the tido/missing-ws branch February 7, 2024 15:51
lunaleaps pushed a commit that referenced this pull request Feb 19, 2024
…#42907)
Summary:
In a pnpm setup, `react-native config` fails to read `react-native/react-native.config.js` because `ws` was not installed:
```
% node --print 'require("react-native/react-native.config.js")'
node:internal/modules/cjs/loader:1137
throw err;
^
Error: Cannot find module 'ws'
```
## Changelog:
[GENERAL] [FIXED] - fix `react-native config` failing in pnpm setups
Pull Request resolved: #42907
Test Plan: n/a
Reviewed By: cipolleschi
Differential Revision: D53516703
Pulled By: robhogan
fbshipit-source-id: 3aded393187df4ca9a7abb64a2c8e0f2c9a5fcd9
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA SignedThis label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.MergedThis PR has been merged.p: MicrosoftPartner: MicrosoftPartnerShared with MetaApplied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@tido64@facebook-github-bot@analysis-bot@robhogan