简体   繁体   中英

Failure to run the Gulp task runner and error while running Gulp Command

I inside the folder where the project is located through the command:

npm i gulp gulp-sass sass --save-dev

I have installed Gulp, but when I want to run it with this command in vs.code terminal:

gulp

I get an error , I wanted to know what caused the error? On the system node js 14.1.0 & 16.13.0 and npm are already installed

在此处输入图像描述

在此处输入图像描述

The error message hints that gulp is not recognized as a command, I don't think this has anything to do with gulp-sass or sass specifically.

Option 1

Install gulp-cli globally:

npm i -g gulp-cli

glup-cli uses whichever version of gulp is installed in your package, and is the prefer way to run gulp.

Option 2

Run gulp directly from your node_modules/.bin folder with the npx command. npx is set up by npm, so there is no need to install any additional packages.

npx gulp

or, equivalently

npm exec gulp

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM