Gruntfile won't load after Visual Studio update 15.8

1.5k Views Asked by At

I updated Visual Studio to 15.8, and now I have the following error when trying to compile my less files using Task Runner Explorer:

Failed to run "C:\Projects\TFS Git Repo\Main\src\Ljmu.Web.UI\Gruntfile.js"...
cmd.exe /c grunt -b "C:\Projects\TFS Git Repo\Main\src\Ljmu.Web.UI" --gruntfile "C:\Projects\TFS Git Repo\Main\src\Ljmu.Web.UI\Gruntfile.js" --tasks "c:\program files (x86)\microsoft visual studio\2017\enterprise\common7\ide\extensions\microsoft\web tools\taskrunnerexplorer\Scripts" vs-grunt-task-reader
grunt[10096]: src\node_contextify.cc:631: Assertion `args[1]->IsString()' failed.
 1: 00007FF677EB82F5 
 2: 00007FF677E94156 
 3: 00007FF677E94221 
 4: 00007FF677E6A69A 
 5: 00007FF6784B5EB2 
 6: 00007FF6784B7008 
 7: 00007FF6784B636D 
 8: 00007FF6784B628B 
 9: 00000292D50841C1 

Any ideas welcome...

Edit

It works fine when running from the command line so I think it's just an issue with Task Runner Explorer.

3

There are 3 best solutions below

1
On BEST ANSWER

The problem happens because the Visual Studio is outdated.

Solution: Add the updated to Visual Studio paths:

Tools > Options > Projects and Solutions > Web Package Management > External Web Tools

Then you need to add your install directory to the top of the list, like so:

Node Path

This solved my problem.

Solution

0
On

Just ran into the same problem after updating to Visual Studio 15.8

Running the below command in the same directory as my package.json seemed to fix the issue for me

npm install gulp

0
On

This worked for my Task Runner Explorer issue:

In Visual Studio, navigate to:

Tools -> Options -> Projects and Solutions -> Web Package Management -> External Web Tools 

Move the $(PATH) entry above the $(VSInstalledExternalTools).

Hit Refresh on your Task Runner Explorer