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.

[Quasar v2] Error importing LocalStorage plugin

See original GitHub issue

Describe the bug Uncaught (in promise) TypeError: quasar_src_plugins_LocalStorage_js__WEBPACK_IMPORTED_MODULE_1__.default.getItem is not a function

Codepen/jsFiddle/Codesandbox (required) – None –

To Reproduce Steps to reproduce the behavior:

  1. Import LocalStore in any Vuex getters file module
  2. Try to get item with LocalStorage.getItem(…)
  3. See error

Expected behavior Get item without error

Screenshots image

Platform (please complete the following information): Quasar Version: @quasar/app Version: Quasar mode: [X] SPA [ ] SSR [] PWA [ ] Electron [ ] Cordova [ ] Capacitor [ ] BEX Tested on: [X] SPA [ ] SSR [ ] PWA [ ] Electron [ ] Cordova [ ] Capacitor [ ] BEX OS: Node: NPM: Yarn: Browsers: iOS: Android: Electron:

Additional context – None –

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
rstoenescucommented, Mar 20, 2021

Applied same trick to Cookies also.

3reactions
rstoenescucommented, Mar 20, 2021

Figured it out. Enhancement will be available in Quasar v2.0.0-beta.10. Thanks for insisting!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v1] `import { LocalStorage } from 'quasar' in boot file returns ...
Hello, I'm using LocalStorage in a boot file w/ v1. I get this error when trying to call getItem() "quasar_src_plugins_LocalStorage_js__ ...
Read more >
Local/Session Storage Plugins - Quasar Framework
A Quasar plugin that wraps the Local/Session Storage, retrieving data with its original JS type.
Read more >
Bug LocalStorage in Jest | Quasar Framework Community
Hello everyone, i'm having this bug when i try running jest in my project: TypeError: quasar_1.LocalStorage.getItem is not a function.
Read more >
Quasar QSpinner module not found - Stack Overflow
Open quasar.conf.js file and look for framework components and add it there. ... Quasar plugins plugins: [ 'Loading', 'LocalStorage', ...
Read more >
The Complete Guide to Vue.js User Authentication with Auth0
Populate src/auth/auth0-plugin.js with the following code that defines a Vue.js plugin module: /** * External Modules */ import Vue ...
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