说明:

在npm install 后,会出现Scanning files to index ...... 出现这个是正常的,但是一直不消失就不正常了。原因是npm install 后 node_modules 内增加了文件夹,但是文件路劲太深所以 才造成phpstorm 一直卡在了 Scanning files to index.... 状态。之后会出现提示框,也就是提示说给phpstorm分配的内存太少。但是,自己要知道,并不是分配的内存少哦。

解决:

右击 node_modules文件夹,并按如图操作点击,也就是让phpstorm不加在这个文件夹。 

如果要取消的话:

你点击File --Project Structure,然后左边选Modules,然后选Sources,然后点击你刚才Excluded掉的文件夹,然后把Mark as后面的Excluded点掉 就可以了。如果你Excluded了好多次,那就重复点击取消Excluded,如图

 
其他说明:
1. 选择mark directory as test sources root,意思是把文件夹设置为源代码根路径,
2. 选择mark directory as test resources root,意思是把文件夹设置为资源文件根路径

intellij idea中Mark Directory As里的Sources Root、ReSources Root等的区别:

1. Source roots (or source folders)

By assigning a folder to this category, you tell IntelliJ IDEA that this folder and its subfolders contain source code that should be compiled as part of the build process.

2. Test source roots (or test source folders; shown as rootTest)

These roots are similar to source roots but are for code intended for testing (e.g. for unit tests). Test source folders let you keep the code related to testing separate from the production code.

Compilation results for sources and test sources, normally, are placed into different folders.

3. Resource roots

are for resource files used in your application (images, various configuration XML and properties files, etc.).

During the build process, all the contents of the resource folders are copied to the output folder as is.

Similarly to sources, you can specify that your resources are generated. You can also specify which folder within the output folder your resources should be copied to.

4. Test resource roots

(or test resource folders; shown as rootTestResourceIJ; available only in Java modules) are for resource files associated with your test sources. In all other respects, these folders are similar to resource folders.

**5. Excluded roots (shown as rootExcluded) are ones that IntelliJ IDEA

“almost ignores”.**

Very limited coding assistance is provided for files in excluded
folders. Classes contained in excluded folders don’t appear in code
completion suggestion lists, references to such classes are shown in the
editor as unresolved. When searching, IntelliJ IDEA doesn’t look in
excluded folders, etc.

intellij 打开node项目 一直停留在scanning files to index....,或跳出内存不够的提示框的更多相关文章

  1. phpstorm(或webstorm) 打开后 一直停留在scanning files to index....,或跳出内存不够的提示框

    记得3月份做项目时就遇到过这个问题,当时解决的 ,但是忘记怎么解决的啦,所以 ,写博文是多么的重要啊. 说明: 在npm install 后,会出现Scanning files to index .. ...

  2. webstorm 打开后 一直停留在scanning files to index....,或跳出内存不够的提示框

    用着有时会这样,超级卡, 网上搜了下,原来如此,记录下,免得忘了. ------------------------- 说明: 在npm install 后,会出现Scanning files to ...

  3. node--->PHPStorm 停留在 Scanning files to index..

    使用webpack时,敲了npm 一些命令后,PHPStorm 开始 Scanning files to index...,去建立文件索引,但是如果一直停留在这个状态,说明是npm install 后 ...

  4. webstorm加载项目卡死在scanning files to index

    今天用webstorm导入项目时,需要加载node-modules文件夹,导致webstorm非常卡,页面提示scanning files to index... 网上搜到办法,记录下: 说明: 在n ...

  5. webstorm 提示 "scanning files to index..." 一直不能编译的问题

    先说一下我的操作过程吧: 下载公司的vue项目后,要用到webpack打包工具,需要按照package.json安装一些依赖,我使用了镜像后,npm install模块时候生成了一个 node_mod ...

  6. pycharm一直scanning files to index

    删除了c盘的垃圾文件之后,pycharm就一直scanning files to index 解决方法: 点击file,然后选择invalidate caches / restart ...,再弹出的 ...

  7. IDEA Intellij 打开springboot项目 配置文件无法出现输入提示

    需要将java代码和资源文件进行标记

  8. webstrom 很卡 底下一直走进度条 scanning files to index

    最近工作总会遇到一些问题 先说说webstrom 其中有一次仅仅开了两个项目 电脑风扇就各种轰鸣 各种重启 安装卸载webstrom 都没有作用 好吧 其实解决很简单 选择一个文件夹,右键, Mark ...

  9. webstorm 很卡 scanning files to index (扫描文件索引)

    webstorm 号称"前端神器",但npm导入包跑索引,会很卡不停的跑索引... 排除你不想索引的文件夹 找到你想排除的文件夹(主要是node_modulewe文件夹),右键选择 ...

随机推荐

  1. 最近ssh遇到异常及解决

    1.SSH框架,spring和struts整合,action中注入service不成功,检测是否缺少 struts2-spring-plugin-2.3.4.1.jar包 2.字符串转 json 加了 ...

  2. C#实现的apache htpasswd加密

    一.VisualSvn Server 这个软件大家都知道,具体使用时创建用户名密码和组时,每次都要登陆到VisualSvn Server所在的机器上,次次如此... 由于一些原因要把这个用户管理的功能 ...

  3. 掌握numpy(四)

    数组的累加(拼接) 在前面讲了使用切片方法能够对数组进行切分,使用copy对切片的数组进行复制,那么数组该如何拼接呢? a1 = np.full((2,3),1)#填充数组 a2 = np.full( ...

  4. System.Transactions 事务超时属性

    最近遇到一个处理较多数据的大事务,当进行至10分钟左右时,爆出事务超时异常,如果Machine.config中不设置最大超时时间,则默认超时时间为10分钟 MachineSettingsSection ...

  5. abstract的方法是否可同时是static,是否可同时是native,是否可同时是synchronized?

    1.abstract与static (what) abstract:用来声明抽象方法,抽象方法没有方法体,不能被直接调用,必须在子类overriding后才能使用 static:用来声明静态方法,静态 ...

  6. Rigidbody组件及相关API

    Rigidbody:刚体组件,物理类.(与Rigidbody组件相关的代码尽量都写在FixedUpdate()方法中,如果写在Update()中有可能会卡顿) 属性:Mass:质量.         ...

  7. bootstrap 组件之"导航条"

    一个典型的导航条基本代码如下: <nav class="navbar navbar-default"> <div class="container&qu ...

  8. [react] 细数 React 的原罪

    Props & onChange 的原罪 .「props & onChange 接口规范」它不是一个典型的「程序接口规范」. 当你拿到一个可视组件的 ref,却没有类似 setProp ...

  9. smali语法(二)

    一.smali的包中信息 .class public Lcom/aaaaa; .super Lcom/bbbbb; .source "ccccc.java" 1.它是com.aaa ...

  10. 软件测试管理QC

    一.QC简介 1)是HP公司的产品,是B/S结构的产品 2)在QC服务器中,打开IE浏览器,在地址栏中输入QC服务器的网址或者IP地址. 查看虚拟机的IP地址: 本地连接-属性-TCP/IP协议(重点 ...