Skip to content

Commit

Permalink
fix(dev-middleware): fix react-native config failing in pnpm setups (
Browse files Browse the repository at this point in the history
…#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
  • Loading branch information
tido64 authored and facebook-github-bot committed Feb 7, 2024
1 parent bd6a199 commit 8f4f09b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/dev-middleware/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"open": "^7.0.3",
"selfsigned": "^2.4.1",
"serve-static": "^1.13.1",
"temp-dir": "^2.0.0"
"temp-dir": "^2.0.0",
"ws": "^6.2.2"
},
"engines": {
"node": ">=18"
Expand Down

0 comments on commit 8f4f09b

Please sign in to comment.