Matt West
Matt West

Reputation: 1396

VS Code error "Cannot convert undefined or null to object" on all JavaScript files

Just this week, whenever I use VS Code to open any JavaScript file, I get a popup at the top of the screen with the indicated error message. It doesn't seem to matter what is in the JS file, and this is a new behavior. It also triggers on js files I didn't write, such as mongoose.js, or any other .js file.

This error does not appear on other types of files, such as HTML or CSS.

I've tried uninstalling and reinstalling VS Code, but that didn't fix the issue.

Has anyone else encountered this? How to I fix or disable this error message? It is very annoying.

Upvotes: 3

Views: 3205

Answers (1)

Matt West
Matt West

Reputation: 1396

Answering my own question since I just got an alert that it was getting a lot of views:

Per my comment above, the problem was being caused by setting the built-in terminal to work with Powershell instead of the standard Windows CLI.

Upvotes: 2

Related Questions