unstorage
unstorage copied to clipboard
Missing "./driver/localstorage" specifier in "unstorage" package
Environment
- Node v18.20.3
- vite v5.3.1
- unstorage v1.10.2
Reproduction
https://stackblitz.com/edit/vitejs-vite-jwsyhr
Describe the bug
[plugin:vite:import-analysis] Missing "./driver/localstorage" specifier in "unstorage" package
Additional context
If line 2 is commented out, it works as expected. Therefore no possibility, to check if line 5 works..
Logs
[plugin:vite:import-analysis] Missing "./driver/localstorage" specifier in "unstorage" package
/home/projects/vitejs-vite-jwsyhr/main.js
at e (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:46574:25)
at n (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:46574:627)
at o (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:46574:1297)
at resolveExportsOrImports (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:47195:18)
at resolveDeepImport (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:47218:25)
at tryNodeResolve (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:46983:16)
at ResolveIdContext.resolveId (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:46733:19)
at async PluginContainer.resolveId (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:49511:22)
at async TransformPluginContext.resolve (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:49672:15)
at async normalizeUrl (file:///home/projects/vitejs-vite-jwsyhr/node_modules/vite/dist/node/chunks/dep-BcXSligG.js:64302:26
@pi0 relates to #56
It is probably a typo unstorage/drivers/localstorage is correct (with s). Dos: https://unstorage.unjs.io/drivers/browser#local-storage