Search code examples
javascriptvisual-studiogulpterminal-emulator

I have a problem with Gulp and the Visual Studio Code terminal


I have been using gulp.js for some time and everything was fine, but today by inserting this code I saw that it gave me this problem:

Terminal

can you tell me why? how do i solve this problem?

Package.json file

gulpfile 1gulpfile 2

Translated error:

I'm sorry if the error is in Italian! I immediately translate anyway: gulp: Term 'gulp' not recognized as a cmdlet name, function, executable program or script file. Check the spelling of the name or verify that the path is included and correct, then try again. In row: 1 car: 1

  • gulp watch
  •    + CategoryInfo: ObjectNotFound: (gulp: String) [], CommandNotFoundException
       + FullyQualifiedErrorId: CommandNotFoundException
    

Solution

  • You have to install the gulp-cli package to use the gulp command. To do so, you can use npm i -g gulp-cli (or yarn global add gulp-cli if you use yarn) to install the gulp command.