sindresorhus / electron-store

Simple data persistence for your Electron app or module - Save and load user preferences, app state, cache, etc
MIT License
4.61k stars 151 forks source link

How can I integrate this library in an Angular Electron App ? #191

Open Karim-Oodrive opened 3 years ago

Karim-Oodrive commented 3 years ago

Hello, I 'am a confirmed Angular Developer and I'am working on an angular-electron,

I want to integrate electron-store in my Angular application, but I didn't know from where should I start ? After installing the package, when I do :

const Store = require('electron-store');
const store = new Store();

I always get many errors

Please give me a response, that will help me a lot, I'am so pressed with this project! thanks.

LeParadoxHD commented 3 years ago

For me it gives:

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
        - add a fallback 'resolve.fallback: { "os": require.resolve("os-browserify/browser") }'
        - install 'os-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
        resolve.fallback: { "os": false }

Error: node_modules/conf/dist/source/index.d.ts:5:5 - error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.

     #private;
mikeliao97 commented 3 years ago

same issue with polyfill, curious if theres solution.

orlandovallejos commented 2 years ago

Any solution yet?

jakehockey10 commented 2 years ago

A solution would be great indeed

pjoulot commented 1 year ago

Same issue with React using the boiler template: https://github.com/electron-react-boilerplate/electron-react-boilerplate

marcjulianfleck commented 1 year ago

Is there a solution for that?

sintanial commented 11 months ago

@marcjulianfleck see https://github.com/sindresorhus/electron-store/issues/259#issuecomment-1817571011