Next.js Discord

Discord Forum

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

Answered
Transvaal lion posted this in #help-forum
Open in Discord
Transvaal lionOP
Vercel is crashing on runtime now with that error

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:110: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: '/'
}

14 Replies

Wedge-tailed Shearwater
This is happening to me too! What's going on? 😳
Spanish Mastiff
We also hit this issue. Confirmed that updating to next 13.5.2 fixed the issue. HTH
whats HTH
Russian Blue
"Hope this helps" i think
Answer
@Spanish Mastiff We also hit this issue. Confirmed that updating to next 13.5.2 fixed the issue. HTH
Russian Blue
updating to 13.5.2 does not fix the issue for us. Will try the issue link provided
Norwegian Forest Cat
The suggestion in the other thread is to redeploy with an enforcement of this ENV variable temporarily. This allowed us to rebuild without 500s.

VERCEL_CLI_VERSION = vercel@32.2.5
Spanish Mastiff
I should’ve been more specific. From the Next 13.5 release announcement (https://nextjs.org/blog/next-13-5) they include this direction: npm i next@latest react@latest react-dom@latest eslint-config-next@latest

Updating all of those solved the issue for us.
Glad to see there’s a second workaround as well.
Same issue here
Great Crested Flycatcher
Same issue here, the Vercel Cli Version ENV worked for me as a workaround
Sinhala Hound
I had this issue yesterday, upgrading to version 13.5.2 fixed the problem for us. We were using the app router on next.js version 13.4.7, after a deploy, we started getting error 500, after upgrading to 13.5.2, the error went away.