说明:

在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. DateTime格式

    SELECT * FROM TABLE (TO_DATE('2007/9/1','yyyy/mm/dd') BETWEEN CGGC_STRATDATE AND CGGC_ENDDATE OR CGG ...

  2. [转载] Apache Lucene初探

    转载自http://www.cnblogs.com/xing901022/p/3933675.html 讲解之前,先来分享一些资料 首先呢,学习任何一门新的亦或是旧的开源技术,百度其中一二是最简单的办 ...

  3. key-value数据库-Redis

    1.简介 Redis是完全开源的ANSI C语言编写.遵守BSD协议,高性能的key-value数据库. 1.1特点 Redis支持数据的持久化,可以将内存中的数据保存在磁盘中,重启的时候可以再次加载 ...

  4. LKD: Chapter 7 Interrupts and Interrupt Handlers

    Recently I realized my English is still far from good. So in order to improve my English, I must not ...

  5. mysql数据库相关知识

    什么是数据库?                数据库(Database)是按照数据结构来组织.存储和管理数据的建立在计算机存储设备上的仓库.(来自:百度) 什么是sql? 结构化查询语言(Struct ...

  6. SpringCloud接入EDAS——服务发现篇

    旁白 很久没有写技术文章了,最近不是写水文就是写小说.说到底,还是最近很少研究技术的缘故,已经到了江郎才尽的地步了. 不过,LZ无意间看到自己团队的小伙伴写的一些文章,觉得还是不错的,于是便动了心思, ...

  7. 前端学习记录之Javascript-DOM

    简介 为了快捷方便,在工作和项目中,一直都是使用的框架,比如jqeruy,vuejs,react等.然后在长时间使用框架后,往往有一个后遗症,就是对于原生的Javascript基本上已经不知道怎么写了 ...

  8. selenium定位tr及td,并获取其文本及属性

    #获取所有的trtrlist=brower.find_elements_by_tag_name("tr")for tr in trlist: #获取tr中的所有td tdlist= ...

  9. JSP6(JSP 指令与JSP 动作元素)

    一.JSP指令用来设置整个JSP页面相关的属性 指令可以有很多个属性,它们以键值对的形式存在,并用逗号隔开. JSP中的三种指令标签: Page指令 Page指令为容器提供当前页面的使用说明.一个JS ...

  10. Thinkphp导入外部类的方法

    相信很多人在使用TP时候都苦恼使用外部类各种不成功 下面为大家详细介绍下引用方法和注意细节 手动加载第三方类库 由于第三发类库没有具体的命名空间,所以需要使用以下几种方法手动导入 1.import方法 ...