-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
estree-walker v3 breaks build #25
Comments
Hi @CodeDredd. What version of Nuxt3 are you using? Do you mind to provide a reproduction please? 🙏🏼 |
Hey @pi0 sure. Sorry for not posting it right aways 😄 . I was using the latest edge version. 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 😆 . |
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! |
I am having this issue also,, just did an |
Error
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 removedSee -> Rich-Harris/estree-walker@f7e336f
A PR to fix this already exists but is till now not merged: Rich-Harris/estree-walker#29
Reproduction
https://stackblitz.com/edit/nuxt-starter-vsshdr?file=package.json
Solution (Hot fix)
Move back to v2
PR incoming 😄
The text was updated successfully, but these errors were encountered: