Skip to content

Package subpath './server.edge' is not defined by "exports" in react-dom/package.json #5

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

Closed
sean-s14 opened this issue Jun 26, 2023 · 2 comments

Comments

@sean-s14
Copy link

sean-s14 commented Jun 26, 2023

next: 13.4.7
next-dev-https: 0.13.3


Running script next-dev-https --https --port 4430 generates the following error:

- error Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in C:\...\node_modules\react-dom\package.json
    at new NodeError (node:internal/errors:393:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:358:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:668:3)
    at resolveExports (node:internal/modules/cjs/loader:529:36)
    at Module._findPath (node:internal/modules/cjs/loader:569:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:981:27)
    at C:\...\node_modules\next\dist\server\require-hook.js:189:36
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at C:\...\node_modules\next\dist\server\app-render\app-render.js:980:37
    at C:\...\node_modules\next\dist\server\lib\trace\tracer.js:159:62
    at C:\...\node_modules\next\dist\server\lib\trace\tracer.js:117:36
    at NoopContextManager.with (C:\...\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:7057)
    at ContextAPI.with (C:\...\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:516)
    at NoopTracer.startActiveSpan (C:\...\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:18086)
    at ProxyTracer.startActiveSpan (C:\...\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:18847)
    at C:\...\node_modules\next\dist\server\lib\trace\tracer.js:106:107
    at NoopContextManager.with (C:\...\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:7057)
    at ContextAPI.with (C:\...\node_modules\next\dist\compiled\@opentelemetry\api\index.js:1:516)
    at NextTracerImpl.trace (C:\...\node_modules\next\dist\server\lib\trace\tracer.js:106:32)
    at C:\...\node_modules\next\dist\server\lib\trace\tracer.js:159:31
    at wrappedRender (C:\...\node_modules\next\dist\server\app-render\app-render.js:1028:62)    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED',
  page: '/'
}
@acocheo
Copy link

acocheo commented Jun 27, 2023

same

@TobiasMelen
Copy link
Owner

Should be fixable by adding __NEXT_PRIVATE_PREBUNDLED_REACT to your .env file as mentioned in the only other, pinned and duplicate issue for this repo: #4.
I'm hesitant to add a hack for it in this repo since the monkey-patch react-dom situation is frankly a bit of a mess on NextJS-side. Hopefully they'll get this sorted, since this is causing issues all over the ecosystem, (except for Vercel hosted NextJS, conveniently)

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