electron-store | Simple data persistence for your Electron app | Storage library
kandi X-RAY | electron-store Summary
kandi X-RAY | electron-store Summary
Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of electron-store
electron-store Key Features
electron-store Examples and Code Snippets
Community Discussions
Trending Discussions on electron-store
QUESTION
I am attempting to build a program using Electron, React.js, and Material UI. I can get the app to open, and the screen to show as intended. However, when I attempt to use ipcRender in a render component the entire screen goes blank. I can verify that this is the line of code that causes issues because simply commenting it out will bring everything back. I require this feature to make a custom app bar.
I have tried removing window.
from the require statement in the render function, but that stops react and throws an error. I have also tried setting nodeIntegration: true
however this makes no change.
This is the main file.
...ANSWER
Answered 2022-Apr-03 at 13:02You should add the code below in preload.js
QUESTION
Hy,
i try to use electron-store to persist values by ip as key. Using the code:
...ANSWER
Answered 2022-Feb-09 at 12:29So what you want is essentially an array of objects, where the objects key is the ip address. In this case though I would rather recommend using an array of arrays because it makes working with the data a bit easier.
So first we create a new Map, which holds our users ip and name:
QUESTION
I'm building a Nuxt-electron-prisma app and I kinda stuck here. when I use prisma normally as guided every thing is fine on dev but on build i get this error :
...ANSWER
Answered 2021-Sep-26 at 06:51Ok, I finally solved it!! first of all no need to change client generator output direction!
QUESTION
I have a electron that looks like this
...ANSWER
Answered 2021-Nov-03 at 14:01Your current preload API isn't actually returning anything:
QUESTION
so i've been messing around with electron and react to create an application, and i've been searching for a way to store data. Not like a lot of data, just a few things that i need.
i've found that electron-store is perfect for what i need. after importing the store in the react file, i keep getting an error:
...ANSWER
Answered 2021-Aug-21 at 20:14So i solved this by using ipcMain and ipcRenderer.
edited the electron.js file as follows:
QUESTION
import Store from 'electron-store';
class Test {
private storeInstance: any;
public initialise() {
if(!Test.storeInstance) {
Test.storeInstance = new Store({name: 'test', key:123}); // returns Default
}
}
public getInstance() {
return Test.storeInstance;
}
}
...ANSWER
Answered 2021-Aug-04 at 19:20from the documentation:
Use
.toBe
to compare primitive values or to check referential identity of object instances. It calls Object.is to compare values, which is even better for testing than === strict equality operator.
instead you should use toMatchObject
, toEqual
or toStrictEqual
QUESTION
I'm trying to create an Electron application using the Vue CLI package in npm, but in the process of using puppeteer, I get the following error message.
...ANSWER
Answered 2021-May-13 at 06:03Make sure you have contextIsolation
set to false
in your BrowserWindow
settings.
Like this:
QUESTION
I Know that there is a lot of topic about this, but since none of them work, I must make a new one, I'm quite confused as why my electron app doesn't launch when I used yarn dev
for my project, but when my friends try it, in his laptop, he can run and the apps launch normally without any problem, so Is there anyone here ever face the same problem with me? if there is someone, how can you solve this problem?
this is what my terminal looks like:
for information I used:
...ANSWER
Answered 2021-Apr-28 at 12:55This may be a silly answer. Try checking whether the task is running or any other programs interfereing the app, like an antivirus.
QUESTION
I was being able to do a functional build with vite@1 and now that I have updated my configuration and my modules to work with vite@2, some assets and components do not load correctly and have paths that do not correspond to the real absolute paths.
It works perfect on dev and although I am making an app with electron, it should not be a problem since as I mentioned before the builds were good with vite@1.
It is not a problem with the assets, they exist in the build folder. Seems to be a problem when they are required.
This is a more detailed issue where you can find all the error messages and screenshots:https://github.com/MangoTsing/vite-electron-quick/issues/11
Although I don't think it has to do with electron, again. Still I put it on vite-electron-quick to rule out the possibility.
This is my vite config:
...ANSWER
Answered 2021-Apr-10 at 15:17Solved! This was happening because vue-router's createWebHistory()
can't hanlde the navigation if the app is not being served. It works on dev mode because vite serves the app but when you build and open the file in a browser it doesn't. So you may say: It is pretty basic, well no... The actual problem was being caused because by the drastical change that vite had at vite@2 and the way the starter-code-templates had to adapt to it. I was using vite with electron, so migrating the starter I'm using was kinda a blinded run. I found that the starter is not serving the file anymore but loading the file directly on the electron main.js
, so because I don't know why this is for, I did not serve the file again, instead changed to createWebHashHistory()
at my router config and then it worked!
QUESTION
I'm having some issues with a CRUD desktop application I developed with the help of a freelancer. It's an electron-forge build that works seamlessly on Windows 10, and works on MacOS initially when accessing the out folder, the strange thing happens when:
- I use
npm run publish
to zip the Mac/Darwin instance - I manually package.zip the results of
npm run make
When I do this, and unzip the file to run, the SQLite integration fails completely. The app appears to be working upon start, but no changes can be made to the DB objects, nor can new objects be made.
The freelancer who put together the DB integration said he was not able to solve this issue, but it's impossible to put apps in marketplaces without zipping the application for delivery. I can post code if necessary, I just don't even know what aspect of the code would be relevant, and feel like there has to be something I can install/put in my package.json
that might solve this, but I'm just not sure.
Here is my package.json file in case that is helpful:
...ANSWER
Answered 2021-Apr-08 at 21:26I found that by simply creating a DMG target (see https://www.electronforge.io/config/makers/dmg) that I did not need to worry about unzipping process. I believe DMG is the ideal approach for packaging Mac OS apps that have something like a SQLite database integration within.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install electron-store
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page