You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cannot start nuxt: No "exports" main defined in /home/dredd/PhpstormProjects/codedredd/pinia-orm/docs/node_modules/nuxt/node_modules/estree-walker/package.json 13:42:34
at new NodeError (node:internal/errors:371:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:440:9)
at packageExportsResolve (node:internal/modules/esm/resolve:645:7)
at resolveExports (node:internal/modules/cjs/loader:482:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
at Function.resolve (node:internal/modules/cjs/helpers:108:19)
at _resolve (node_modules/jiti/dist/jiti.js:1:108226)
at jiti (node_modules/jiti/dist/jiti.js:1:110413)
at node_modules/nuxt/node_modules/unctx/dist/transform.cjs:7:22
Reason
The reason is simple. As the error displays since v3 of estree-walker the "main" in package.json was removed
See -> Rich-Harris/estree-walker@f7e336f
I know my solution is the easy one....since estree-walker dropped commonjs support with removing "main". Somehow jiti is not able to handle this correctly.
Still working on framework to trace what places need proper esm import with jiti. In the meantime, please remove lockfile and node_modules and start dev with:
Thanks @pi0 . Yeah looked already on your PR for nuxt/framework. I already was confused why native esm was not supported 😆 .
So it seems i still have to find another thing to get my first PR to nuxt, vue, unjs,^^
Activity
fix: estree-walker v3 breaks build
pi0 commentedon Aug 4, 2022
Hi @CodeDredd. What version of Nuxt3 are you using? Do you mind to provide a reproduction please? 🙏🏼
CodeDredd commentedon Aug 4, 2022
Hey @pi0 sure. Sorry for not posting it right aways 😄 . I was using the latest edge version.
https://stackblitz.com/edit/nuxt-starter-vsshdr?file=package.json
I know my solution is the easy one....since estree-walker dropped commonjs support with removing "main". Somehow jiti is not able to handle this correctly.
fix(pkg): `/transform` subpath is also esm-only
pi0 commentedon Aug 4, 2022
Still working on framework to trace what places need proper esm import with jiti. In the meantime, please remove lockfile and node_modules and start dev with:
CodeDredd commentedon Aug 4, 2022
Thanks @pi0 . Yeah looked already on your PR for nuxt/framework. I already was confused why native esm was not supported 😆 .
So it seems i still have to find another thing to get my first PR to nuxt, vue, unjs,^^
pi0 commentedon Aug 4, 2022
Okay last missing part was nuxt configuration loader (unjs/c12) to support esm resolution. Updating lockfile again should solve issues.
Absolutely! Looking forward to your next PR!
JenuelDev commentedon Jun 9, 2023
I am having this issue also,, just did an
nxp nuxi upgrdae --force