payload icon indicating copy to clipboard operation
payload copied to clipboard

Error: Package subpath './api' is not defined by "exports"

Open alsherif-khalaf opened this issue 1 year ago • 0 comments

Link to reproduction

No response

Payload Version

3.0.0-beta.86

Node Version

v20.16.0

Next.js Version

15.0.0-canary.120

Describe the Bug

Just after upgrading website template from 3.0.0-beta.84 to 3.0.0-beta.86

Error: Package subpath './api' is not defined by "exports" in /home/alsherif-khalaf/Dev/Fronted/node_modules/.pnpm/node_modules/drizzle-kit/package.json

 ⨯ Internal error: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './api' is not defined by "exports" in /home/alsherif-khalaf/Dev/Fronted/node_modules/.pnpm/node_modules/drizzle-kit/package.json
    at exportsNotFound (node:internal/modules/esm/resolve:304:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:651:9)
    at resolveExports (node:internal/modules/cjs/loader:592:36)
    at Module._findPath (node:internal/modules/cjs/loader:669:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
    at /home/alsherif-khalaf/Dev/Fronted/node_modules/.pnpm/[email protected][email protected]_react-_rqfkhogt5n2fvqlo4encehp2ke/node_modules/next/dist/server/require-hook.js:55:36
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at mod.require (/home/alsherif-khalaf/Dev/Fronted/node_modules/.pnpm/[email protected][email protected]_react-_rqfkhogt5n2fvqlo4encehp2ke/node_modules/next/dist/server/require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at Object.requireDrizzleKit (../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]_geplkdckm5wi5lvx6l6emukxxu/node_modules/@payloadcms/drizzle/dist/postgres/requireDrizzleKit.js:8:31)
    at pushDevSchema (../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]_geplkdckm5wi5lvx6l6emukxxu/node_modules/@payloadcms/drizzle/dist/utilities/pushDevSchema.js:13:36)
    at Object.connect (../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_pg_ygrsu4ol6dqzwjkgwek4gfjxee/node_modules/@payloadcms/db-postgres/dist/connect.js:85:81)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async BasePayload.init (../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/payload/dist/index.js:559:13)
digest: "3398702718"
 ⨯ Internal error: Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './api' is not defined by "exports" in /home/alsherif-khalaf/Dev/Fronted/node_modules/.pnpm/node_modules/drizzle-kit/package.json
    at exportsNotFound (node:internal/modules/esm/resolve:304:10)
    at packageExportsResolve (node:internal/modules/esm/resolve:651:9)
    at resolveExports (node:internal/modules/cjs/loader:592:36)
    at Module._findPath (node:internal/modules/cjs/loader:669:31)
    at Module._resolveFilename (node:internal/modules/cjs/loader:1131:27)
    at /home/alsherif-khalaf/Dev/Fronted/node_modules/.pnpm/[email protected][email protected]_react-_rqfkhogt5n2fvqlo4encehp2ke/node_modules/next/dist/server/require-hook.js:55:36
    at Module._load (node:internal/modules/cjs/loader:986:27)
    at Module.require (node:internal/modules/cjs/loader:1233:19)
    at mod.require (/home/alsherif-khalaf/Dev/Fronted/node_modules/.pnpm/[email protected][email protected]_react-_rqfkhogt5n2fvqlo4encehp2ke/node_modules/next/dist/server/require-hook.js:65:28)
    at require (node:internal/modules/helpers:179:18)
    at Object.requireDrizzleKit (../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]_geplkdckm5wi5lvx6l6emukxxu/node_modules/@payloadcms/drizzle/dist/postgres/requireDrizzleKit.js:8:31)
    at pushDevSchema (../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected][email protected]_geplkdckm5wi5lvx6l6emukxxu/node_modules/@payloadcms/drizzle/dist/utilities/pushDevSchema.js:13:36)
    at Object.connect (../node_modules/.pnpm/@[email protected]_@[email protected]_@[email protected][email protected]_pg_ygrsu4ol6dqzwjkgwek4gfjxee/node_modules/@payloadcms/db-postgres/dist/connect.js:85:81)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async BasePayload.init (../node_modules/.pnpm/[email protected][email protected][email protected]/node_modules/payload/dist/index.js:559:13)
digest: "3398702718"
 GET /admin 500 in 37718ms

Reproduction Steps

Just upgrading website template from 3.0.0-beta.84 to 3.0.0-beta.86

Adapters and Plugins

No response

alsherif-khalaf avatar Aug 20 '24 09:08 alsherif-khalaf