fix(dev-middleware): fix react-native config failing in pnpm setups (#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: https://github.com/facebook/react-native/pull/42907

Test Plan: n/a

Reviewed By: cipolleschi

Differential Revision: D53516703

Pulled By: robhogan

fbshipit-source-id: 3aded393187df4ca9a7abb64a2c8e0f2c9a5fcd9
This commit is contained in:
Tommy Nguyen
2024-02-07 07:17:12 -08:00
committed by Facebook GitHub Bot
parent bd6a199f21
commit 8f4f09bf70
+2 -1
View File
@@ -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"