Vuex-persistedstate: "export 'default' (imported as 'shvl') was not found in 'shvl'

Created on 10 Apr 2018  路  7Comments  路  Source: robinvdvleuten/vuex-persistedstate


Do you want to request a feature or report a bug?
Bug
What is the current behavior?
"export 'default' (imported as 'shvl') was not found in 'shvl'
If the current behavior is a bug, please provide the steps to reproduce.
I have installed "vuex-persistedstate": "^2.5.1", , using webpack when I tried to compile I got this error

screen shot 2018-04-09 at 6 14 35 pm

What is the expected behavior?

If this is a feature request, what is motivation or use case for changing the behavior?

Most helpful comment

Just for reference, there is a already a PR that should fix the issue: #132

All 7 comments

is bug, i use version 2.0.0 now

Since shvl exports its functions separately, it needs to be imported as

import * as shvl from 'shvl';

in order to work properly. I'm not sure why it is importing correctly in the tests, but the import x from 'pkg' syntax is for the default export only.

I have encountered the same problem,but how to solve?

I am using webpack with vue and I get
1:395-396 "export 'default' (imported as 'e') was not found in 'shvl'

and also vuex-persistedstate.es.js?5a4a:1 Uncaught TypeError: Cannot read property 'get' of undefined at __webpack_exports__.a (vuex-persistedstate.es.js?5a4a:1)
in the code related to import e from"shvl"

import * as e from 'shvl' based on shvl readme loaded the app. Not sure about its working behaviour. but with no error.

Just for reference, there is a already a PR that should fix the issue: #132

please see release v2.5.2

Was this page helpful?
0 / 5 - 0 ratings