question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

estree-walker v3 breaks build

See original GitHub issue

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 removed See -> https://github.com/Rich-Harris/estree-walker/commit/f7e336f94290fd4b72cbc033922d606f1e27d8b9

A PR to fix this already exists but is till now not merged: https://github.com/Rich-Harris/estree-walker/pull/29

Reproduction

https://stackblitz.com/edit/nuxt-starter-vsshdr?file=package.json

Solution (Hot fix)

Move back to v2

PR incoming 😄

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
CodeDreddcommented, 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,^^

1reaction
pi0commented, 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:

JITI_ESM_RESOLVE=1 npm run dev
Read more comments on GitHub >

github_iconTop Results From Across the Web

unctx | Yarn - Package Manager
BREAKING CHANGES. deps: update estree-walker to v3 (#23); strict ctx.use and new ctx.tryUse (#7) ... deps: update estree-walker to v3 (#23 (f88439e) ...
Read more >
Missing: @vue/shared@3.2.45 from lock file - Stack Overflow
I'm using Amplify to host a web app in Vue js 2.X. which is built through the CI CD. Tested several times it...
Read more >
Compare Versions | @elliemae/pui-cli | npm
@babel/helper-create-regexp-features-plugin 7.20.5 ... estree-walker 1.0.1. add. estree-walker 2.0.2. esutils 2.0.3 ... postcss-page-break 3.0.4.
Read more >
Relay
That means you won't accidentally break other components as you refactor or ... Relay was built in tandem with GraphQL and has full-time...
Read more >
Npm package installation error on other partition
Better use a dedicated directory under /mnt or create a custom one. ... 'estree-walker': [ '1.0.1' ], 156 silly audit esutils: [ '2.0.3'...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found