DEV Community

Sean Atukorala
Sean Atukorala

Posted on

4 2

[Solved] MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe"

Problem:

Running into the following error when trying to run npm install in a React application:



npm ERR! MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". 
To fix this, 
1) install the .NET Framework 2.0 SDK, 
2) install Microsoft Visual Studio 2005 or 3) 
add the location of the component to the system path if it is installed elsewhere.  
[..\node_modules\node-sass\build\binding.sln]



Enter fullscreen mode Exit fullscreen mode

Solution:

This error has failed to be resolved after trying the well known solution of running the following commands on an Administrator Windows PowerShell instance:



npm install -g node-gyp
npm install --global --production windows-build-tools 


Enter fullscreen mode Exit fullscreen mode

Windows PowerShell frozen after running the above commands

Figure 1: PowerShell freezes after running the above commands

Due to PowerShell freezing after running the above commands, I abandoned trying to run npm install on a Windows OS altogether.

Instead, I transferred over the application to a Ubuntu VM instance and was able to run npm install with no issues.
So try creating a Linux VM and porting over your codebase onto it. Then run npm install and see if it works.

While this method does not directly solve the error on Windows, I believe it is the quickest and most pragmatic workaround if you don't mind working in a Linux environment.

Conclusion

Thanks for reading this blog post!

If you have any questions or concerns please feel free to post a comment in this post and I will get back to you when I find the time.

If you found this article helpful please share it and make sure to follow me on Twitter and GitHub, connect with me on LinkedIn and subscribe to my YouTube channel.

Image of Docusign

Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay