Ionic Issues: Error: Cannot find module 'gulp -util'

I have some problems trying to start gulp using Ionic.

An error message will appear:

Error: cannot find module 'gulp -util'

in Function.Module._resolveFilename (module.js: 338: 15) in Function.Module._load (module.js: 280: 25) on Module.require (module.js: 364: 17) on demand (module.js: 380: 17) in the facility. (/Users/emilymacleod/Desktop/myApp/gulpfile.js:2:13) on Module._compile (module.js: 456: 26) in Object.Module._extensions..js (module.js: 474: 10) on Module.load (module.js: 356: 32) in Function.Module._load (module.js: 312: 12) on Module.require (module.js: 364: 17)

I tried installing sass and gulp locally in myApp folder, as well as globally and without cubes.

Thoughts?

+5
source share
2 answers

Kind of a long frame, but gulp-util is a separate module . You must install it locally:

 npm install gulp gulp-util --save-dev 

and will require it in your code:

 var gutil = require('gulp-util'); 
+6
source

I had a similar problem with gulp-sass. Error message:
Oh oh It looks like you are missing a module in your gulpfile: Cannot find the module 'gulp-sass'

Do you need to run npm install ?

Solved by doing the following:

  • npm -g install npm
  • npm install gulp -sass

I hope for this help.

0
source

Source: https://habr.com/ru/post/1212024/


All Articles