Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"The build task could not find node.exe which is required to run the TypeScript compiler." occurred after update Boostrap

I developed an ASP.Net MVC web application and It's almost completed. After That, I updated Bootstrap through NuGet package manager to Bootstrap latest stable version 4.3.1 Update was successfully completed. But after the migration following errors are occurred.

Error Build:Cannot find name 'Record'.
Error Build:Cannot find name 'undefined'.

To solve that I installed TypeScript for Visual Studio 2015. Then the above error solved and the following error occurred.

Severity Code Description Project File Line Suppression State Error The build task could not find node.exe which is required to run the TypeScript compiler. Please install Node and ensure that the system path contains its location. ABH.SW.HotelManagement

How can I solve this? I tried to google it for the past 2 days but I wasn't able to find any solution

like image 952
Sachith Wickramaarachchi Avatar asked Dec 04 '22 18:12

Sachith Wickramaarachchi


1 Answers

This is the only post for this problem, so I'll do my bit for those who use Bootstrap 4.3.1, TypeScript, and VS2015.

First, once you create the project and are about to install Bootstrap 4.3.1 through NuGet, don't let Visual Studio manage TypeScript Typings for you. Check no.

enter image description here

Once Bootstrap and stuff is installed, clean the solution: right click on your solution -> clean solution

Next, open NuGet console (Tools → NuGet Package Manager → Package Manager Console), and install TypeScript 3.0 using this command:

Install-Package Microsoft.TypeScript.MSBuild -Version 3.0.0

Close Visual Studio, open it again, and that's it. Took for me a lot of research to find out that several TypeScript versions cause a lot of conflicts and 3.0 is one of those that actually work.

like image 199
Javierdds Avatar answered May 05 '23 06:05

Javierdds