Missing dependencies on pages that need a Netlify function

Ok this is a surprising outcome:

which I found from: Request must be smaller than 69905067 bytes for the CreateFunction

❯ yarn why react-native-get-random-values
yarn why v1.22.10
[1/4] πŸ€”  Why do we have the module "react-native-get-random-values"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] πŸ”  Finding dependency...
[4/4] 🚑  Calculating file sizes...
=> Found "react-native-get-random-values@1.7.0"
info Reasons this module exists
   - "_project_#@resistbot#site#@netlify#plugin-nextjs#@sls-next#lambda-at-edge#@aws-sdk#client-s3#@aws-sdk#middleware-retry" depends on it
   - Hoisted from "_project_#@resistbot#site#@netlify#plugin-nextjs#@sls-next#lambda-at-edge#@aws-sdk#client-s3#@aws-sdk#middleware-retry#react-native-get-random-values"
info Disk size without dependencies: "104KB"
info Disk size with unique dependencies: "120KB"
info Disk size with transitive dependencies: "120KB"
info Number of shared dependencies: 1
✨  Done in 1.06s.

Super unfortunate that this dependency is likely out of reach for you too. But perhaps you can nudge the AWS folks to reconsider this dependency, I’m a bit surprised how widespread it’s chaos is.

I just removed these (the netlify plugins) from my own package.json and the problem still exists (but at least I don’t have react-native-get-random-values in dependencies anymore). Failing now on react-native:

❯ yarn why react-native
yarn why v1.22.10
[1/4] πŸ€”  Why do we have the module "react-native"...?
[2/4] 🚚  Initialising dependency graph...
[3/4] πŸ”  Finding dependency...
error We couldn't find a match!
✨  Done in 0.94s.
4:10:43 PM:   Error message
4:10:43 PM:   A Netlify Function failed to require one of its dependencies.
4:10:43 PM:   Please make sure it is present in the site's top-level "package.json".
​
4:10:43 PM:   In file "/opt/build/repo/packages/site/netlify/functions/next_index/next_index.js"
4:10:43 PM:   Cannot find module 'react-native'