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

Configuration: Error: Expected an object to validate, but received undefined (path: module.exports.) #140

Closed
xiaobq opened this issue Oct 25, 2020 · 6 comments
Labels

Comments

@xiaobq
Copy link

xiaobq commented Oct 25, 2020

Whenever I changed the config file correctly and save it in my VS Code, most of the time it reports error
Configuration: Error: Expected an object to validate, but received undefined (path: module.exports.)

I can ignore it and it still works.
When I save it again, it may say "reload config successfully."

How can we solve this annoying error message?

@jeff-dagenais
Copy link

Exact same here. I have no time to debug now though.

@johnste johnste added the bug label Oct 28, 2020
@johnste
Copy link
Owner

johnste commented Oct 28, 2020

Won't have time to look at this for now, hopefully next week.

Some questions though:

  • Does it only happen when you save in VS Code?
  • Are you using any VS Code extentions like custom formatters like prettier, or plugins that act on the file after or before it is saved?

@jeff-dagenais
Copy link

I did disable "javascript.format.enable": false as well as "editor.formatOnSave": false, it is still doing the problem.

I hate to say it, but it may be one of those times a short sleep would help?? 🤢 Yeah, perhaps some more investigating before throwing the towel though. 😉

@xiaobq
Copy link
Author

xiaobq commented Nov 1, 2020

I tried in system text editor and there is no error. Seems it's an issue for VS code only.
I use ESLint, but I don't use Prettier.
I'm not sure if I use any plugins that act on the file after or before it is saved because I don't know how to check it.

johnste added a commit that referenced this issue Nov 7, 2020
@johnste
Copy link
Owner

johnste commented Nov 7, 2020

Yes I can reproduce this issue too. Adding a 100 ms delay seems to fix the issue, so I pushed that change right now in this commit. Next release will contain this fix, hopefully sometime in November.

@johnste
Copy link
Owner

johnste commented Nov 21, 2020

@johnste johnste closed this as completed Nov 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants