#ERROR No "exports" main defined in path/to/myproject/node_modules/@nuxt/kit/package.json

4 messages · Page 1 of 1 (latest)

glossy ingot
#

I have suddenly started getting this error and have no idea how to track down the cause. My app has been working well for quite a while now and suddenly it started throwing this error on postinstall step.

i am using a monorepo and all the local dependencies down the chain are building just fine, to be safe, i've tried removing them and no luck.

the only recent addition to my package.json since my last build is "@woven agatejs/google-fonts": "^3.0.0"

as this is happening in the postinstall step, i suspect it's a related library but have no clue what to try next

 ERROR  No "exports" main defined in /Users/buckfactor/work/fnb/node_modules/@nuxt/kit/package.json               10:05:17

  at new NodeError (node:internal/errors:393:5)
  at throwExportsNotFound (node:internal/modules/esm/resolve:358:9)
  at packageExportsResolve (node:internal/modules/esm/resolve:612:7)
  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 Function.resolve (node:internal/modules/cjs/helpers:109:19)
  at resolveModule (/Users/buckfactor/work/fnb/node_modules/.pnpm/nuxi@3.2.2/node_modules/nuxi/dist/shared/nuxi.f17c7643.mjs:17:29)
  at importModule (/Users/buckfactor/work/fnb/node_modules/.pnpm/nuxi@3.2.2/node_modules/nuxi/dist/shared/nuxi.f17c7643.mjs:37:24)
  at loadKit (/Users/buckfactor/work/fnb/node_modules/.pnpm/nuxi@3.2.2/node_modules/nuxi/dist/shared/nuxi.ede95f37.mjs:5:18)
glossy ingot
#

next step: re-cloning/re-building my entire repository fixed the issue

#

so likely a problem somewhere with pnpm....

glossy ingot
#

so now it just happens again. leaving this here in case anyone has any idea