Can't execute the task in VS Code to run gulpfile.js

北城以北 提交于 2019-12-20 07:26:54

问题


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?

来源:https://stackoverflow.com/questions/40616268/cant-execute-the-task-in-vs-code-to-run-gulpfile-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!