diff --git a/python/pluginSrc/com/jetbrains/python/module/PyProjectStructureDetector.java b/python/pluginSrc/com/jetbrains/python/module/PyProjectStructureDetector.java index 585ce5c16680..4e805355e83a 100644 --- a/python/pluginSrc/com/jetbrains/python/module/PyProjectStructureDetector.java +++ b/python/pluginSrc/com/jetbrains/python/module/PyProjectStructureDetector.java @@ -49,11 +49,15 @@ public class PyProjectStructureDetector extends ProjectStructureDetector { @NotNull List result) { LOG.info("Detecting roots under " + dir); for (File child : children) { - if (FileUtilRt.extensionEquals(child.getName(), "py")) { + final String name = child.getName(); + if (FileUtilRt.extensionEquals(name, "py")) { LOG.info("Found Python file " + child.getPath()); result.add(new DetectedContentRoot(dir, "Python", PythonModuleTypeBase.getInstance(), WebModuleType.getInstance())); return DirectoryProcessingResult.SKIP_CHILDREN; } + if ("node_modules".equals(name)) { + return DirectoryProcessingResult.SKIP_CHILDREN; + } } return DirectoryProcessingResult.PROCESS_CHILDREN; }