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
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in /home/projects/node-apcmcb/node_modules/estree-walker/package.json
This causes issues in Vitest, for example (#1978), or any tools that imports it without preprocessing.
What does the proposed API look like?
I propose removing CJS build altogether, but keep index.js with an if statement (I assume it's used for more old tools that don't understand "exports" field.) If it is meant to be used with estree-walker@2, we should have it for compatibility with Jest. (it's not specified in package.json)
I would also recommend adding "exports" field with compatible Node ESM build (meaning, type: "module" or .mjs extension, docs)
The root cause is that @vue/compat did not list its own dependencies, so it was resolving to a hoisted & newer version of estree-walker that doesn't have CJS build.
Previously the cjs build implicitly relies on hoisted versions of the
deps, causing it to resolve to newer versions of estree-walker when
present.
fixvuejs#6602
What problem does this feature solve?
@vue/compat
depends onestree-walker
, which doesn't support CJS build: https://stackblitz.com/edit/node-apcmcb?file=index.jsThis causes issues in Vitest, for example (#1978), or any tools that imports it without preprocessing.
What does the proposed API look like?
I propose removing CJS build altogether, but keep
index.js
with anif
statement (I assume it's used for more old tools that don't understand "exports" field.) If it is meant to be used with estree-walker@2, we should have it for compatibility with Jest. (it's not specified inpackage.json
)I would also recommend adding "exports" field with compatible Node ESM build (meaning,
type: "module"
or.mjs
extension, docs)The text was updated successfully, but these errors were encountered: