Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
node_modules slow down the VS 2017 IDE

I am working on an angular 2 project, and it is created by angular/CLI. After I opened my project by 'open -> folders,' the CPU usage been boosted to over 50% and everything becomes very slow. I tested it that the slowdown issue caused by 'node_moduls'. After I removed this folder, the IDE will back to normal.

However, in the project, I still need the 'node_moduls' folder, because I got error message everywhere if I removed the 'node_moduls' folder! Even an import from the angular core!

import { Component, OnInit, ViewChild, Input, Output, EventEmitter } from '@angular/core';)

Is any way to fix this problem?

As I can see, VS 2017 keep scanning my folders and files, and this process has been taken for 3 hours. Now the IDE still takes 30% usage of the CPU usage. I think it needs to port the VS code's folders management idea to VS 2017. enter image description here

And I have checked the "exclude" option that should show on the right-click menu. However, it does not have any option for excluding the folder.

enter image description here

update: It has been a night, (I kept the VS2017 open) the VS still taking 30-40% CPU usage, and the scanning data still on 45% same with the first image.

about 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Instead of using

File -> Open -> Folder

use

File -> Open -> Web Site...

UPDATE:

or (thanks wodzu)

Solution > Add > Existing Website

Navigate to the location on your hard drive where the project lives and select its directory.

Since it is after all a web site that should work fine and it doesn't perform the scan.

I had the same issue but didn't want to modify the tsconfig.json file since that configuration is used by the angular cli tool which we use to compile the app.

about 4 years ago · Santiago Trujillo Report

0

Don't include node_modules in your VS project because it takes forever to load.

In your tsconfig.json file, you need to exclude the node_modules folder from being compiled:

"compilerOptions": 
    ...
},
"exclude": [
    "node_modules"
]
about 4 years ago · Santiago Trujillo Report

0

In order to make angular2 node_modules work in Visual Studio I had to add "skipLibCheck": true to the tsconfig.json file.

{
  "compilerOptions": {
     ...
    "skipLibCheck": true
   }
}

This will prevent the node_modules from being built with typescript.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!