【发布时间】:2019-11-11 18:03:48
【问题描述】:
我经常收到“Visual Studio Code 无法监视这个大型工作区中的文件更改”的错误,我不知道为什么。
Visual Studio Code (Linux): 1.24.1
我的排除设置是:
"files.watcherExclude": {
"**/.git/objects/**": true,
"**/.git/subtree-cache/**": true,
"**/node_modules/*/**": true,
"**/.svn/**": true,
"**/dist/**": true,
"**/dist-prod/**":true
}
项目的结构是:
angular.json
/dist
/dist-prod
/e2e
ngsw-config.json
/node_modules
package.json
package-lock.json
proxy.conf.json
README.md
/src
tsconfig.json
tslint.json
xliffmerge.json
.editorconfig
.gitignore
/.svn
/src 仅包含 167 个文件和文件夹。我怀疑 node_modules 并没有真正被排除在外。但我不能确定。我的设置正确吗?
VSC重启后问题就消失了,但过一会又总是出现...
【问题讨论】:
-
我也经历过(并继续经历)这个问题。我打开了github.com/Microsoft/vscode/issues/59679
-
不错的举动 Jack :-) 我使用了似乎是一般方法的解决方法,但感觉不对:stackoverflow.com/questions/50901127/…
-
我也认为问题在于 node_modules 并没有真正被排除在外。安装新模块后我收到警告,不包括 node_modules 我的项目中只有大约 20 个文件。
Watcher exclude设置为默认值,其中包括**/node_modules/**