Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: No supported storage has been added! Add one (e.g store.createStore(require('store/storages/cookieStorage')) #239

Closed
sahiljain112 opened this issue Jun 20, 2017 · 8 comments

Comments

@sahiljain112
Copy link

import store from 'store';
const set = (key, value) => store.set(key, value); 
const get = key => store.get(key);

This is my code. The version I'm using is v2.0.9.
I checked the source code and it shouldn't give me that error since the storage array is being imported from storage/all. Why am I getting this error?

@marcuswestin
Copy link
Owner

marcuswestin commented Jun 20, 2017 via email

marcuswestin added a commit that referenced this issue Jun 20, 2017
@marcuswestin
Copy link
Owner

Hey @sahiljain112,

I added a test for this issue (https://github.com/marcuswestin/store.js/blob/master/tests/bugs/gh-239.js). It's currently passing under v2.0.9. Can you double check and help me create a repro please?

@dyegolara
Copy link

dyegolara commented Jun 20, 2017

Yeah, we had the same issue yesterday, updated our dependencies and everything broke when updated to v2.0.8.
On v2.0.4 everything was fine, I think it was on 2.0.5 or 2.0.6 where things got strange.

It happens on Safari, Firefox, Chrome and Chromium in both Linux and Mac in at least 3 different machines in our company

I was going to submit the same issue yesterday but I'm glad someone else did.

If you need something from me to help you fix this issue, ill do it happly.

@marcuswestin
Copy link
Owner

@dyegolara I've merged a few additional PRs and added a few small features. Current version is 2.0.11. Can you please verify that the latest version is broken for you, and if so help me figure out how to reproduce your issue? Currently all out tests are passing on all browsers.

@marcuswestin
Copy link
Owner

I'm still unable to repro. v2.0.9, v2.0.10 and v2.0.11 all work as expected for me:

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
<script type="text/javascript" src="https://unpkg.com/store@2.0.9/dist/store.legacy.min.js"></script>
<script type="text/javascript">
	store.set('foo', 'bar')
	console.log(store.get('foo'))
</script>
</body>
</html>

@sahiljain112 @dyegolara Please help me figure out how to reproduce your issue.

@dyegolara
Copy link

dyegolara commented Jun 20, 2017

Just did the update to 2.0.11, everything works fine!!

Thanks man, you have an awesome library, very useful for a lot of users and companies, you have made the web a better place. Keep being cool!

@marcuswestin
Copy link
Owner

👍 Thanks @dyegolara :)

@sahiljain112
Copy link
Author

Hey @marcuswestin . Everything is working as expected in v2.0.9.
I triggered a build with v2.0.8 for which this error was displayed. Thanks for the help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants