node-toogoodtogo-watcher icon indicating copy to clipboard operation
node-toogoodtogo-watcher copied to clipboard

How to modify config file while adding our token

Open greunder opened this issue 1 year ago • 3 comments

Hi I was wondering how can I modify the config file because I've been struggling for hours when I did a mistake inside the file.

There's an error but I don't know in which folder it is and the conf file in the root folder of the project is still unchanged.

Any recommendations ?

greunder avatar Apr 05 '23 06:04 greunder

image

greunder avatar Apr 05 '23 08:04 greunder

It looks like you added a closing square bracket "]" somewhere in the config file where it shouldn't be, resulting in a JSON parsing error.

The command toogoodtogo-watcher config-reset just triggers the following function:

export function resetConfig() {
   config.set(defaults);
}

I wasn't able to find out how exactly this works, but I feel like it just takes in the current JSON config and replaces some values. So if your current config is broken, it cannot be replaced because it would need to read in the current config and reset it with a new one.

You should try to locate the config file and replace it with the proper one that you find in this repository :) https://github.com/marklagendijk/node-toogoodtogo-watcher/blob/2ed1aad0cba68427647d6ac43b5f62345a638564/config.defaults.json

basti1499 avatar Apr 10 '23 20:04 basti1499

I've got a very simular issue here, made a f-up in my config, can't find the config and can't use config-reset because the config file is incorrect.

Where in windows would we find the used config?

I already removed and re installed the module, same for my nodejs install (completely reinstalled)

imnotnoa avatar Sep 14 '23 06:09 imnotnoa