Comments (6)
Oh, thanks a lot, im going to do it with gists. Thanks @jonschlinkert and @doowb
from data-store.
Hmm, let's try to figure out what's happening.
A few questions:
- Can you share a snippet of code to show your configuration for the Store? It would be useful to see how the options are passed, including the store name, cwd/path etc.
- Can show an example or describe more about how you're using the actual API? It would help to know, for example, if the Store API is being used directly, or if another class inheriting
Store
, etc. This will help us rule out prototype pollution or similar causes. - Can you share the version of node that is being used? OS? Or any other info about the environment that might help.
- It sounds like there isn't anything specific that is telling you what might be happening. Do you have any "hunches" or thoughts about what what's causing the bug? Anything at all that might help get us thinking?
Fwiw, I have a complete refactor of this ready to push up, I started working on it a while ago. It's possible that it will solve whatever issue you're having, simply because it's simpler and has fewer dependencies, making it easier to debug and use.
However, it has a few breaking changes. I'll try to list them here in a bit, but I want to create this reply so you have a change to respond first.
Thanks for brining this to our attention! It's greatly appreciated!
from data-store.
Thanks for responding that fast!
This is my store declaration:
var store = require('data-store')('abc', { cwd: './store' });
Im using node 8.11.1
Os, hmm i don't know, my bot is hosted by heroku and i deploy it using GIT.
I have this: When i start bot, the values are registred in the database, but, when i restart the bot, the values disappear, maybe git is preventing to create the store file, and is deleting it, or maybe something is resseting the store file.
from data-store.
@plopez01 I don't think heroku persists files across restarts so the file is probably being deleted then. You would need to save the file someplace else before the bot shuts down and restore it when the bot starts up. You could do this with S3 or even use gists to keep a secret gist of the file.
from data-store.
Ah, that's it! I guess this is good news, and bad news. I didn't pay enough attention to the Heroku comment. AFAIK, heroku still does not allow data to be persisted like that. It will be deleted every time you git push. I'm not sure what the best solution would be for you, since I know very little about your use case and lots of other important factors, but now that we know what the likely cause is, I'm pretty sure there is a bunch of info on the heroku docs, stackoverflow, google about what's happening and other options.
from data-store.
ha I didn't see @doowb's comment until I saved my last one! The page didn't refresh! Looks like I was a little late on that one! lol
from data-store.
Related Issues (20)
- TypeError: Class constructor Store cannot be invoked without 'new' HOT 2
- store.set() key with dot dymbol HOT 1
- Inconsistency of undefined HOT 1
- Delete object inside array HOT 1
- error while using del method in typescript HOT 1
- Does store.load() delete the data?
- store.clear into store.set into store.load deletes whole store HOT 2
- Create optional lock file for use of the data-store by external process HOT 7
- Release Notes ? HOT 1
- Retrieving data-store HOT 1
- deprecated isObject HOT 1
- decreated isObject HOT 1
- NPM owner HOT 3
- v4.1.0 has not been published to npm HOT 6
- How can stored values be updated? HOT 1
- Does not seem to save new data, but reverts back to old data. HOT 6
- Data-store wont save anything. HOT 2
- How to pass a variable as key
- Depends on 2 high severity vulnerabilities
- Data store not reading correctly the file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from data-store.