'Nextjs not working with react-native and expo

I am trying to set up a expo project with nextjs. I first ran the expo init command expo init . and set up the project in my directory. This seems to work fine. Then I followed the steps here https://docs.expo.dev/guides/using-nextjs/ under the adding nextjs to expo projects and did yarn add -D @expo/next-adapter then yarn next-expo and then yarn next dev. Then it just spews out a bunch of warnings. Most notably the following 2 repeating. I can't post the entire warning because it is too long. What is the deal and what am I doing wrong? Did I miss something? Is this not production ready and should I just forget this? I don't know where to start when it comes to fixing these errors.

Warning: useTransformReactJsxExperimental has been renamed to useTransformReactJSXExperimental (capitalized JSX) in [email protected]
Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-property-in-object since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
        ["@babel/plugin-proposal-private-property-in-object", { "loose": true }]
to the "plugins" section of your Babel config.

and

(node:3996) [DEP_WEBPACK_EXTERNALS_FUNCTION_PARAMETERS] DeprecationWarning: The externals-function should be defined like ({context, request}, cb) => { ... }
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:3996) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\build\webpack-config.js:661:33)
    at webpackConfig.externals (D:\Development\Projects\testing-expo\node_modules\next\dist\build\webpack-config.js:766:24)
    at D:\Development\Projects\testing-expo\node_modules\@expo\webpack-config\webpack\addons\withUnimodules.js:162:58
    at D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36695:21
    at deprecated (internal/util.js:96:15)
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36843:8)
    at next (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36821:9)
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36826:7)
    at D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36923:5
    at Hook.eval [as callAsync] (eval at create (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:140346:10), <anonymous>:37:1)
(node:3996) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
(node:3996) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:3996) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\build\webpack-config.js:661:33)
    at webpackConfig.externals (D:\Development\Projects\testing-expo\node_modules\next\dist\build\webpack-config.js:766:24)
    at D:\Development\Projects\testing-expo\node_modules\@expo\webpack-config\webpack\addons\withUnimodules.js:162:58
    at D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36695:21
    at deprecated (internal/util.js:96:15)
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36843:8)
    at next (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36821:9)
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36826:7)
    at D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36923:5
    at Hook.eval [as callAsync] (eval at create (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:140346:10), <anonymous>:37:1)
(node:3996) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)
(node:3996) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'startsWith' of undefined
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\build\webpack-config.js:661:33)
    at webpackConfig.externals (D:\Development\Projects\testing-expo\node_modules\next\dist\build\webpack-config.js:766:24)
    at D:\Development\Projects\testing-expo\node_modules\@expo\webpack-config\webpack\addons\withUnimodules.js:162:58
    at D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36695:21
    at deprecated (internal/util.js:96:15)
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36843:8)
    at next (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36821:9)
    at handleExternals (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36826:7)
    at D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:36923:5
    at Hook.eval [as callAsync] (eval at create (D:\Development\Projects\testing-expo\node_modules\next\dist\compiled\webpack\bundle5.js:140346:10), <anonymous>:37:1)
(node:3996) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source