-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Store does not work in renderer process #268
Comments
e.g
|
I'm getting the same issue, but I have nodeIntegration enabled, which disables sandbox. This error only showed up after updating electron and electron forge. |
I have a somewhat similar issue, after I upgraded to Electron v30 my Vue application doesn't have access to the store anymore. Downgrading to the last v29 version of Electron fixed it for the time being |
When I encountered this issue, it was because I was passing Electron Store directly through to the renderer process via In other words, instead of writing this in your
You should instead approach it like this in your
Then something along these lines in your main process:
You will also need to deal likewise with any other packages that shouldn't be exposed to the renderer process. |
I've electron app with Angular frontend. I'm trying to use Store in the renderer process as described in the README file
Here is my code for preload and electron-main.js:
preload.js file:
electron-main.js file:
When I use Store in above way I got the error:
Unable to load preload script: /home/Documents/todo-desktop/src/app/app-preload.js
(anonymous) @ VM4 sandbox_bundle:2
VM4 sandbox_bundle:2 Error: module not found: electron-store
at preloadRequire (VM4 sandbox_bundle:2:82751)
at :3:15
at runPreloadScript (VM4 sandbox_bundle:2:83503)
at VM4 sandbox_bundle:2:83762
at VM4 sandbox_bundle:2:83917
at _electron_webpack_init (VM4 sandbox_bundle:2:83921)
at VM4 sandbox_bundle:2:84044
(anonymous) @ VM4 sandbox_bundle:2
As soon as I remove Store from preload.js file, I didn't get any error.
The text was updated successfully, but these errors were encountered: