当前位置:   article > 正文

解决IDEA因某个文件夹导致扫描卡死的一直scanning files to index的问题,例如node_modules_idea waiting for scanning

idea waiting for scanning

问题背景:
我的IDEA在打开Maven项目时,因为有个model是vue的UI项目,UI项目使用cnpm install后会多出来一个node_modules文件夹,该文件夹内容非常多,而且很大。我打开IDEA的时候,因为要扫描全文件夹,所以会一直处于加载中,一直scanning files to index…

我的解决办法:
1、找到项目所在文件夹
2、使用文本编辑器打开 yourProjName.iml 文件(yourProjName是你的项目名)
3、在iml文件中 content 标签内添加
4、保存文件重启IDEA即可

参考iml:

<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
    <output url="file://$MODULE_DIR$/target/classes" />
    <output-test url="file://$MODULE_DIR$/target/test-classes" />
    <content url="file://$MODULE_DIR$">
      <excludeFolder url="file://$MODULE_DIR$/target" />
      <excludeFolder url="file://$MODULE_DIR$/biz-ui" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13

该方法参考博客:点击这里

其他解决办法,可进行尝试:点击这里

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/article/detail/40192
推荐阅读
相关标签
  

闽ICP备14008679号