You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SDK package too large for Lambda, contains frontend frameworks #383
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...
This was closed as addressed in v12.0.0, but v12 does not remove react-native for pnpm users — I've opened #507 with the details.
Short version: making react-native-url-polyfill an optional peer doesn't stop pnpm from installing it, because pnpm has had auto-install-peers on by default since v8. On a plain Node service with pubnub@12.0.3 and pnpm 10.9, pnpm why image-size still shows the full chain:
@Kaspik — the vulnerability angle you raised is now worse. image-size has two high-severity DoS advisories (GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq), both <=2.0.2, and 2.0.2 is the latest published version — so there is no patched release to move to. pnpm audit reports Patched versions: <0.0.0, which fails --audit-level=high on every CI run with no upgrade path.
@yo1dog — your overrides workaround has a pnpm equivalent, but it's fragile: aliasing the edge to a local empty package broke our multi-stage Docker build, since the stub has to exist at install time in every build context. ignoredOptionalDependencies and peerDependencyRules.ignoreMissing don't suppress it either on pnpm 10.9.
Activity
andrewpuch commentedon Jul 12, 2024
I'm running into the same issue.
yo1dog commentedon Oct 11, 2024
The problem is the
react-native-url-polyfillwhich in turn includes the entirereact-nativelibrary.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 commentedon Oct 14, 2024
Here is my workaround. Prevent
react-native-url-polyfillfrom being included (and thusreact-native) by adding an NPM override topackage.json: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.Kaspik commentedon Jun 18, 2026
2 years later, this has not been resolved. That dependency has even vulnerabilities reported.
@stephenlb - worth checking it finally?
pubnub-release-bot commentedon Jun 22, 2026
@tmcpartlin this issue is addressed in v12.0.0
valeporti commentedon Aug 11, 2026
This was closed as addressed in v12.0.0, but v12 does not remove
react-nativefor pnpm users — I've opened #507 with the details.Short version: making
react-native-url-polyfillan optional peer doesn't stop pnpm from installing it, because pnpm has hadauto-install-peerson by default since v8. On a plain Node service withpubnub@12.0.3and pnpm 10.9,pnpm why image-sizestill shows the full chain:@Kaspik — the vulnerability angle you raised is now worse.
image-sizehas two high-severity DoS advisories (GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq), both<=2.0.2, and 2.0.2 is the latest published version — so there is no patched release to move to.pnpm auditreportsPatched versions: <0.0.0, which fails--audit-level=highon every CI run with no upgrade path.@yo1dog — your
overridesworkaround has a pnpm equivalent, but it's fragile: aliasing the edge to a local empty package broke our multi-stage Docker build, since the stub has to exist at install time in every build context.ignoredOptionalDependenciesandpeerDependencyRules.ignoreMissingdon't suppress it either on pnpm 10.9.Worth reopening this or tracking it in #507.