VS代码错误:(this.configurationService.getValue(…)[]).filter不是函数
我刚开始在 VS Code 中收到此错误,阻止我创建新文件甚至打开文件。VS Code 显示的弹出错误是(this.configurationService.getValue(...) || []).filter is not a function
这个错误/错误甚至阻止我打开扩展选项卡或启动基本热键。还有其他人有这个问题吗?
回答
我有同样的问题。
在 settings.json 中发现了一些错误。试着检查一下,让我知道它会怎样。
每次我尝试创建一个新文件时都会弹出这个错误说
“(this.configurationService.getValue(...) || []).filter 不是函数”
就我而言,我必须将“workbench.editorAssociations”标志修复为:
"workbench.editorAssociations": [
{
"viewType": "jupyter-notebook",
"filenamePattern": "*.ipynb"
}
],
以前是:
"workbench.editorAssociations": {
"*.ipynb": "jupyter-notebook"
}
回答
我发现错误中的问题来自 VS Code 的 settings.json(在此处为 mac 找到~/Library/Application Support/Code/User/settings.json)。有一个更新的扩展更新了一个错误。我的特别的似乎来自这一行:
"workbench.editorAssociations": { "*.ipynb": "jupyter.notebook.ipynb" }
无论如何,希望这对将来的人有所帮助!
- Replacing the flag from [this thread](https://www.reddit.com/r/vscode/comments/ndjjjy/cant_create_new_file_nor_open_new_file_in_vscode/) also resolved the problem – it looks like settings sync between the stable and insiders edition also contributed to this issue.
THE END
二维码