找了好久后,发现是node_modules文件夹的原因。处理方式如下:选中node_modules文件夹,右键将其排除在索引之外。右键选择node_modules文件夹 — 选中Mark Directory As — Excluded 使用上述方法后项目还是跑不起来,把node_modules文件夹删掉后就OK了。