sindresorhus / electron-store

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

Upgrade to latest conf #266

Closed ArTiSTiX closed 4 months ago

ArTiSTiX commented 1 year ago

Hello !

I am trying to use a fork of conf package (in order to test my changes before making a pull request), but electron-store still uses an outdated version of conf. Since conf is now using ESM, it requires some changes which makes the upgrade not-so-trivial.

I tried to do it, but i am loosing my mind, i don't know what i'm doing wrong in either my electron app, or in my changes, but when importing my own upgraded fork of electron-store, im having an error:

Error [ERR_REQUIRE_ESM]: require() of ES Module L:\dev\ljas\midi-jar\node_modules\electron-store\index.js

Here is my fork: https://github.com/la-jarre-a-son/electron-store/tree/upgrade-conf-esm

Could someone be of any help, i've seen some forks using latest conf, but no PR, and tests are not passing.

ArTiSTiX commented 1 year ago

I guess this is the same issue as for dot-prop, you wait for Electron to be ESM-friendly...

iamterryclark commented 11 months ago

I believe Electron have completed the PR on ESM. is it possible to now update electron-store?

imkimchi commented 6 months ago

did you find any workaround for this? I'm getting the same error and been looking for ways to fix it but no luck

Attiybom commented 5 months ago

When I packaged and ran my program, I encountered the "conf module not found" issue. I think we might be facing the same problem, perhaps due to conf using ESM. I hope the official team can resolve this.

npmstudy commented 4 months ago

@sindresorhus the same issue. need a pr?