Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK package too large for Lambda, contains frontend frameworks #383

Open
tmcpartlin opened this issue Jun 12, 2024 · 3 comments
Open

SDK package too large for Lambda, contains frontend frameworks #383

tmcpartlin opened this issue Jun 12, 2024 · 3 comments

Comments

@tmcpartlin
Copy link

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.

@andrewpuch
Copy link

I'm running into the same issue.

@yo1dog
Copy link

yo1dog commented Oct 11, 2024

The problem is the react-native-url-polyfill which in turn includes the entire react-native library.

├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]

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...

@yo1dog
Copy link

yo1dog commented Oct 14, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants