Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to modify config file while adding our token #229

Open
greunder opened this issue Apr 5, 2023 · 3 comments
Open

How to modify config file while adding our token #229

greunder opened this issue Apr 5, 2023 · 3 comments

Comments

@greunder
Copy link

greunder commented Apr 5, 2023

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 greunder changed the title How to modify config file when adding our token How to modify config file while adding our token Apr 5, 2023
@greunder
Copy link
Author

greunder commented Apr 5, 2023

image

@basti1499
Copy link

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

@imnotnoa
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants