prazdevs / pinia-plugin-persistedstate

💾 Configurable persistence and rehydration of Pinia stores.
https://prazdevs.github.io/pinia-plugin-persistedstate/
MIT License
2.13k stars 121 forks source link

Missing "./package.json" export #288

Closed seriousDevWork closed 6 months ago

seriousDevWork commented 8 months ago

Describe the bug

Hi,

Issue description: When trying to build quasar app with "npx quasar build", "pinia-plugin-persistedstate" throws an error.

C:\Users\guest\Documents\project\test\frontend\main-app\node_modules\vite\dist\node\chunks\dep-40c65ceb.js:38597
        throw new Error(
              ^

Error: Missing "./package.json" export in "pinia-plugin-persistedstate" package
    at bail (C:\Users\guest\Documents\project\test\frontend\main-app\node_modules\vite\dist\node\chunks\dep-40c65ceb.js:38597:8)
    at resolve (C:\Users\guest\Documents\project\test\frontend\main-app\node_modules\vite\dist\node\chunks\dep-40c65ceb.js:38674:10)
    at resolveExports (C:\Users\guest\Documents\project\test\frontend\main-app\node_modules\vite\dist\node\chunks\dep-40c65ceb.js:40982:12)
    at resolveDeepImport (C:\Users\guest\Documents\project\test\frontend\main-app\node_modules\vite\dist\node\chunks\dep-40c65ceb.js:41000:31)
    at tryNodeResolve (C:\Users\guest\Documents\project\test\frontend\main-app\node_modules\vite\dist\node\chunks\dep-40c65ceb.js:40773:20)
    at Object.resolveId (C:\Users\guest\Documents\project\test\frontend\main-app\node_modules\vite\dist\node\chunks\dep-40c65ceb.js:40581:28)
    at C:\Users\guest\Documents\project\test\frontend\main-app\node_modules\rollup\dist\shared\rollup.js:22826:37 {
  code: 'PLUGIN_ERROR',
  plugin: 'vite:resolve',
  hook: 'resolveId'
}

This is my first time encountering this error since using this package in other framework. This time, I started with Quasar + Vite via the CLI installation. Is Quasar + Vite not compatible with "pinia-plugin-persistedstate" package? Any clarification will be appreciated. Thanks !

Package Version: "pinia": "^2.0.11", "pinia-plugin-persistedstate": "^3.2.1", "quasar": "^2.6.0", "vue": "^3.0.0",

Quasar Build Info: Build mode............. spa Pkg quasar............. v2.15.0 Pkg @quasar/app-vite... v1.8.0 Pkg vite............... v2.9.17

Reproduction

NA

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (8) x64 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
    Memory: 17.12 GB / 31.69 GB
  Binaries:
    Node: 16.20.2 - C:\Program Files\nodejs\node.EXE
    npm: 8.19.4 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (122.0.2365.66)
    Internet Explorer: 11.0.19041.3636

Used Package Manager

npm

Validations

prazdevs commented 6 months ago

Please provide a proper reproduction.