#Server.edge not exported by react-dom

1 messages · Page 1 of 1 (latest)

lusty kernel
#

How can I fix this error?

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in /app-next/node_modules/react-dom/package.json
    at new NodeError (node:internal/errors:387:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:365:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:649:3)
    at resolveExports (node:internal/modules/cjs/loader:554:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:594:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1007:27)
    at /app-next/node_modules/next/dist/server/require-hook.js:180:36
    at Function.Module._load (node:internal/modules/cjs/loader:866:27)
    at Module.require (node:internal/modules/cjs/loader:1093:19)
    at require (node:internal/modules/cjs/helpers:108:18)
    at /app-next/node_modules/next/dist/server/app-render/app-render.js:946:37
    at /app-next/node_modules/next/dist/server/lib/trace/tracer.js:155:62
    at /app-next/node_modules/next/dist/server/lib/trace/tracer.js:113:36
    at NoopContextManager.with (/app-next/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7057)
    at ContextAPI.with (/app-next/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:516)
    at NoopTracer.startActiveSpan (/app-next/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18086)
    at ProxyTracer.startActiveSpan (/app-next/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:18847)
    at /app-next/node_modules/next/dist/server/lib/trace/tracer.js:102:107
    at NoopContextManager.with (/app-next/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:7057)
    at ContextAPI.with (/app-next/node_modules/next/dist/compiled/@opentelemetry/api/index.js:1:516)
    at NextTracerImpl.trace (/app-next/node_modules/next/dist/server/lib/trace/tracer.js:102:32)
    at /app-next/node_modules/next/dist/server/lib/trace/tracer.js:155:31
    at wrappedRender (/app-next/node_modules/next/dist/server/app-render/app-render.js:997:62)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
stark pikeBOT
#

Hi @lusty kernel. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Hmm, I don't know enough to give you a confident answer yet. The provided extracts don't contain information related to the specific error you're encountering. I recommend checking the Next.js documentation (https://nextjs.org/docs) and searching for similar issues on forums or GitHub to find a solution.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

Welcome to the Next.js Documentation.

#

@lusty kernel kapa.ai is still learning and improving, please let us how it did by reacting below

lusty kernel
#

@stark pike What is the reccomended version of react to use in next?

stark pikeBOT
#

Let me check the knowledge base for you. One moment! :books:

#

The recommended version of React to use with Next.js is the latest version. As of Next.js 11, the minimum React version required is 17.0.2. When upgrading to Next.js 13, you should also update React to the latest version. You can do this by running the following command:

npm install react@latest react-dom@latest

Or using yarn:

yarn add react@latest react-dom@latest

Source: Upgrading to Next.js 11 (https://nextjs.org/docs/pages/building-your-application/upgrading/version-11) and Upgrading from 12 to 13 (https://nextjs.org/docs/pages/building-your-application/upgrading/version-13)

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

Upgrade your Next.js Application from Version 10 to Version 11.

Upgrade your Next.js Application from Version 12 to 13.

#

@lusty kernel kapa.ai is still learning and improving, please let us how it did by reacting below

hard wave
#

Same, anyone gotten around this?

#

Looks like it resolved itself.