vuejs / vuex

🗃️ Centralized State Management for Vue.js.
https://vuex.vuejs.org
MIT License
28.42k stars 9.58k forks source link

package.json does not export ./package.json #2160

Closed nicksellen closed 2 years ago

nicksellen commented 2 years ago

Version

4.0.2

Reproduction link

github.com

Steps to reproduce

Steps are included in the README for the repo, here is a minimal version. I have node version v17.9.0 so it might be dependent on some recent changes there...

git clone https://github.com/nicksellen/vuex-package-json.git
cd vuex-package-json
yarn
npx quasar info

What is expected?

It should show that vuex is installed, like this:

vuex - 4.0.2 -- state management for Vue.js

What is actually happening?

It shows:

vuex - Not installed

When I add some debug output, the error underlying is:

Package subpath './package.json' is not defined by "exports" in /tmp/foo/quasar-project/node_modules/vuex/package.json

It's actually fixed in the #main branch of vuex 6 months ago in this commit , it's just not been released... manually applying that change to node_modules/vuex/package.json resolves the issue locally.

mk-pmb commented 2 years ago

I'm affected as well. When will a version with the patch be released?

maffmeier commented 2 years ago

I've the same problem.

yyx990803 commented 2 years ago

fixed by 397e9fb in 4.1