Resharper exclude node_modules from Refactor
Hello all,
When I try to refactor my TypeScript code, Resharper searches through the node_modules folder and tries to refactor all of the code in there as well. I went to the Options and under Code Inspection...Settings, I excluded the node_modules folder, but Resharper is still trying to refactor my node_modules. How do I stop this behavior?
Thanks,
Alex C. Barberi
Please sign in to leave a comment.
Hello Alex,
Please try this ReSharper | Options | Code Editing | Third-Party Code lists.
Thanks!
See problem
Actually, I am still having a problem. Check this out... Looks like ReSharper is not handling the the underscore in node_modules properly? Look at this screenshot. I tried to refactor and R# is still looking in my node_modules folder.
Anyone have any tips here? What should I do? ReSharper is still trying to refactor everything in the node_modules folder.
I am also having this problem. I am using Visual Studio 2017 and when I use the Third-Party Code option above and try to add the node_modules folder it gives me the error below. It is true that I don't have node_modules as part of the solution but Resharper still searches in node_modules when I try to refactor and it takes forever and sometimes doesn't finish.
If it helps I have an TypeScript Angular 2 app that DOES reference things in the node_modules directory (using the es2015 module import) but Resharper shouldn't look in that folder for refactoring.
Please someone from the Resharper team reply to this.
Thanks.
Same for me: (bower_components folder in reality has underscore)
I just made a post with a similar issue like this one, but I don't have any underscores in my paths, BUT i do have a dot in the ignore path, like this "<src>/ProjectName.Application/FolderToIgnore". Could this be the part of the same problem, perhaps?
Link to my post: https://resharper-support.jetbrains.com/hc/en-us/community/posts/115000669604--C-ReSharper-ignoring-Third-Party-Code-settings-when-refactoring
I have the same problem (popup) with the 2021.2 version of resharper as jbweb had four years ago.
Note: We took node_modules out of our git repository due to the size.
Edit: The "File masks" contain "node_modules\**".
Hello Rainer Prem, have you tried excluding a folder by mask to avoid the popup problem?