node-toogoodtogo-watcher
node-toogoodtogo-watcher copied to clipboard
How to modify config file while adding our token
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 ?

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
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)