说明:

在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. final、static、代码块、静态代码块、内部类、代码执行顺序

    final final域使得确保初始化安全性(initialization safety)成为可能,初始化安全性让不可变形对象不需要同步就能自由地被访问和共享 作用在类上               ...

  2. 来手撸一个小小小小小"3D引擎"

    开始的唠叨 说是3D引擎确实有点过于博眼球了,其实就是实现了一个透视投影,当然也不是那么简单的. 此篇文章是纯粹给小白看的 高手请勿喷 .也称之为小向带你图形学入门基础 . 哇哈哈哈哈 一说到做一个3 ...

  3. angular2.x指令

    1.指令 *ngIf: 判断 isActive 为true时 <user-detail> 生效展示 <user-detail *ngIf="isActive"&g ...

  4. JAVA基础4——谈谈HashCode与HashMap相关概念

    谈谈HashCode与HashMap HashCode hashCode,即一个Object的散列码. HashCode的作用: 对于List.数组等集合而言,HashCode用途不大: 对于Hash ...

  5. BST 解析 (一)

    这篇博文主要初步介绍Binary Search Tree(BST)的一些基本功能以及应用场景,由于BST的相关知识比较多,下一节会接着补充BST的一些功能.这一节主要分为以下三个要素: BST 的定义 ...

  6. python基础0

    1.运行:D:\tools\python\python-2.7.10.amd64=>安装到c:\python 2.环境变量:path:c:\Python27 3.cmd:python回车 //s ...

  7. canvas画一个时钟

    效果图如下 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF ...

  8. Scala入门系列(五):面向对象之类

    定义类 // 定义类,包含field以及method class HelloWorld { private var name = "Leo" def sayHello() { pr ...

  9. JavaSE初步学习笔记

    PS:个人用来随时记录学习的过程,格式比较混乱,仅供个人参考与复习知识点 Dos命令行,课程中常见的命令 Dir:列出当前目录下包含的文件 Md:在当前目录下创建文件 Rd:在当前目录下删除指定文件夹 ...

  10. svn搭建文档

    1.制作本地yum源 a)挂载光盘 [root@localhost ~]# mount  /dev/cdrom  /mnt b)删除/etc/yum.repos.d目录所有的repo文件 [root@ ...