VS Code Error: (this.configurationService.getValue(...) || []).filter is not a function VS Code Error: (this.configurationService.getValue(...) || []).filter is not a function json json

VS Code Error: (this.configurationService.getValue(...) || []).filter is not a function


I had the same problem.

Found few errors in settings.json. Try to check it and let me know how it will go.

This error pops up every time I try to create a new file saying

"(this.configurationService.getValue(...) || []).filter is not afunction"

In my case, I had to fix "workbench.editorAssociations" flag to:

"workbench.editorAssociations": [    {        "viewType": "jupyter-notebook",        "filenamePattern": "*.ipynb"    }],

Previously it was:

"workbench.editorAssociations": {    "*.ipynb": "jupyter-notebook"}


I figured out the issue in the error is coming from the settings.json for VS Code (found here for mac ~/Library/Application Support/Code/User/settings.json). There was an extension that updated got updated with a bug. My particular one seems like it came from this line:

"workbench.editorAssociations": { "*.ipynb": "jupyter.notebook.ipynb" }

Anyways, hope this is helpful for someone in the future!


I had the same error, where the jupyter-notebook extension was updated and caused a bug.

In the settings navigate to "workbench.editorAssociations",

replace

 "*.ipynb": "jupyter-notebook"

with

 "viewType": "jupyter-notebook", "filenamePattern": "*.ipynb"

and everything will work fine.

For the settings file,

By default VS Code shows the Settings editor, but you can still editthe underlying settings.json file by using the Open Settings (JSON)command or by changing your default settings editor with theworkbench.settings.editor setting.

Depending on your platform, the user settings file is located here:

Windows %APPDATA%\Code\User\settings.json

macOS $HOME/Library/Application Support/Code/User/settings.json

Linux $HOME/.config/Code/User/settings.json