Open tmcpartlin opened 5 months ago
I'm running into the same issue.
The problem is the react-native-url-polyfill
which in turn includes the entire react-native
library.
├─┬ pubnub@8.2.8
│ ├─┬ react-native-url-polyfill@2.0.0
│ │ ├── react-native@0.75.4
Upgrading to v8 adds 464 NPM packages, several of which are deprecated. It is quite ridiculous to pollute projects to such an extreme extent. I can't upgrade to v8 until this is fixed because it makes the project too large...
Here is my workaround. Prevent react-native-url-polyfill
from being included (and thus react-native
) by adding an NPM override to package.json
:
"overrides": {
"pubnub": {
"react-native-url-polyfill": "npm:pubnub@*"
}
}
I use pubnub@*
because it is a package I know is already installed and thus will not add to the dependency tree, but you can specify any package.
Since the SDK includes React and React Native this SDK is very large.
The dependency on react-native-url-polyfill seems to be causing all the other dependencies. After removing this package, the SDK is much smaller.
Suggestion: have an optional package that can be just for the NodeJS server side that does not include these frontend frameworks and dependencies.