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

Use the module in web worker #82

Closed
osenvosem opened this issue Jul 31, 2019 · 1 comment
Closed

Use the module in web worker #82

osenvosem opened this issue Jul 31, 2019 · 1 comment

Comments

@osenvosem
Copy link

Electron 6.0.0 + webpack + worker-loader + TS
electron-store 4.0.0

When trying to instantiate store:

Uncaught TypeError: Cannot read property 'app' of undefined
    at new ElectronStore (index.js:8)
    at Module../node_modules/ts-loader/index.js?!./src/renderer/workers/stats.ts (stats.ts:12)
    at __webpack_require__ (bootstrap:724)
    at bootstrap:791
    at bootstrap:791
@sindresorhus
Copy link
Owner

You cannot use it in a worker. The Electron environment is not available there.

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

2 participants