Skip to content

TypeError: Store is not a constructor #289

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

Open
MProix opened this issue Apr 15, 2025 · 3 comments
Open

TypeError: Store is not a constructor #289

MProix opened this issue Apr 15, 2025 · 3 comments

Comments

@MProix
Copy link

MProix commented Apr 15, 2025

Beginning of my code :

const { app, BrowserWindow, ipcMain, Menu, Notification, nativeImage } = require("electron"),
    Store = require("electron-store"),
    store = new Store()

When I'm running my app, i've got a :
"App threw an error during load
TypeError: Store is not a constructor"

It worked well some weeks ago...

Thanks for your help

@MProix
Copy link
Author

MProix commented Apr 15, 2025

Ok, solved by uninstalling and installing older version (from 10.0.1 to 8.1.0)

@blackawn
Copy link

Ok, solved by uninstalling and installing older version (from 10.0.1 to 8.1.0)

You can convert main and preload to esm

@no-chili
Copy link

The same issue occurred in my Vite project, and eventually I switched toelectron-conf

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

No branches or pull requests

3 participants