Next.js Discord

Discord Forum

[ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports"

Answered
ᵗʰᵉ Nexus posted this in #help-forum
Open in Discord
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in /var/task/node_modules/react-dom/package.json
    at new NodeError (node:internal/errors:405:5)
    at exportsNotFound (node:internal/modules/esm/resolve:364:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:700:9)
    at resolveExports (node:internal/modules/cjs/loader:567:36)
    at Module._findPath (node:internal/modules/cjs/loader:636:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1063:27)
    at /var/task/node_modules/next/dist/server/require-hook.js:180:36
    at Module._load (node:internal/modules/cjs/loader:922:27)
    at e.<computed>._module.Module._load (/var/task/___vc/__launcher.js:15:1964)
    at Module.require (node:internal/modules/cjs/loader:1143:19) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED',
  page: '/'
}
RequestId: 3a5230d5-d3cf-40b9-9e96-ea94ae46fc02 Error: Runtime exited with error: exit status 1
Runtime.ExitError

I started having this error in vercel out of nowhere, I went back to the version that used to work and it has the same error.

It just gives this error in vercel, does anyone know what it could be?
Answered by Spanish Mastiff
We also hit this issue. Confirmed that updating to next 13.5.2 fixed the issue. HTH
View full answer

7 Replies

Transvaal lion
Same
Siamese
had the same took my whole website down out of nowhere after a succesful deploy...
Transvaal lion
yeah same behavior here
luckily for me it's in a preview
not gonna make any build to prod then
Spanish Mastiff
We also hit this issue. Confirmed that updating to next 13.5.2 fixed the issue. HTH
Answer
Chinese Alligator
This issue resolved it for us. If you're on vercel, you can lock down the version: https://github.com/vercel/vercel/issues/10564