6

I am following this SASS tutorial by net-ninja on YouTube which recommends installing gulp with SASS. However I can't get gulp to work. As per the tutorial I created the gulpfile.js, index.html and index.css then I ran the following npm commands:

npm init
npm install gulp gulp-sass sass --save-dev

When I ran gulp, I get the error:

Error: Cannot find module 'gulp-cli'

So I ran

npm install gulp-cli --save-dev

But the error persists. As per the comments in the YouTube tutorial I also installed gulp and gulp-cli as global modules with:

npm install --global gulp gulp-cli --save-dev

but this did not change anything. Gulp-cli is in both my global modules folder and the node_modules folder within the project folder. Can anyone propose a solution please?

Similar questions here and here, but not exact and following both of them doesn't resolve the issue.

stanley
  • 177
  • 8

3 Answers3

0

Same problem here, on other installations (WSL2 ubuntu 20.04) it worked with no problems, this time around it did not (on dedicated ubuntu 20.04 dev server).

Anyway, followed the gulp get started Gulp website While I was in the root directory and after running npm install --global gulp-cli everything worked fine

George
  • 1
  • 1
  • 2
0

In my case -force did it

npm install --global gulp-cli -force
alex
  • 182
  • 4
  • 9
0

You could use yarn to install gulp instead:

sudo yarn add gulp --location=global
Bender the Greatest
  • 17,062
  • 18
  • 82
  • 145