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
CodePudding user response:
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