yeoman / configstore

Easily load and persist config without having to think about where and how
BSD 2-Clause "Simplified" License
868 stars 56 forks source link

Error when using configstore within electron-prebuild #45

Closed ff6347 closed 8 years ago

ff6347 commented 8 years ago

Hi there, I'm trying to use the lib within a electron project but I get this error:

Uncaught Exception:
TypeError: Cannot set property 'path' of undefined
    at Configstore (/Users/icke/Documents/frntl/frontal/app/node_modules/configstore/index.js:26:12)

Where can this come from?

I boiled it down to this gist https://gist.github.com/fabiantheblind/c557f3dcccf135b9ae441ed200f22e55

sindresorhus commented 8 years ago

It's a class. You have to use new.

Sidenote: For Electron usage. I would recommend electron-config instead, which is optimized for Electron.

ff6347 commented 8 years ago

m( (facepalm). Sorry. I'll take a look at electron-config. Thanks.