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 150 forks source link

SyntaxError: Bad control character in string literal in JSON at position 3 #278

Open zengjianze opened 3 months ago

zengjianze commented 3 months ago

Hi, I am use electron-store, version 8.2.0 with node version v18.19.1 when I use follow code: const store = new Store(); it will give me follow error: SyntaxError: Bad control character in string literal in JSON at position 3

I also try other way like `const schema: Schema = { // type: 'object',
userPath: { type: 'string' }

            };
            const store = new Store<SchemaData>({ schema });`

but still encount the same error