Can't execute the task in VS Code to run gulpf

2020-05-06 17:23发布

问题:

Trying to follow roughly this guide (as many like this one). In tasks.json I've added the following, right next to build task.

{
"taskName": "gulpify",
"args": [],
"showOutput": "always",
"isBuildCommand": true
}

In gulpfile.js I've added the following.

var gulp = require("gulp");
//gulp.task("default", "gulpify");
gulp.task("gulpify", function () {
  alert("bzz");
  console.log("bzz");
});

When I execute the task from the embedded workbench command line (not PowerShell but the internal that opens inside VS Code), I get the error saying the below. I've tried both with and without comment on the "default" line in the sample above (because I'm not clear on what it does but many blogs have it, hehe).

No executable found matching command "dotnet-gulpify"

When I google it, I get that I need to have Gulp installed both locally and globally (which I have). It's also suggested that I need to be on the same level as project.json (which I believe I am since I clicked on that file and have it open). I can run the build task, too, so I'm guessing I've missed something rather easy but confusing to an ignorant person.

How to troubleshoot it?