0
votes

After I installed gulp,I execute the following command

I tried following steps,

1.npm install

versions npm :- 6.9.0, node :- 10.15.13, python :- 2.7.10

2.npm install gulp

versions CLI version :- 3.9.1, Local version :- 3.9.1

And I Also tried globaly,its also showing same error

> npm install -g gulp

After Install gulp in above version and run the following command

gulp like

internal/modules/cjs/loader.js:584 throw err; ^

Error: Cannot find module 'iconv' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15) at Function.Module._load (internal/modules/cjs/loader.js:508:25) at Module.require (internal/modules/cjs/loader.js:637:17) at require (internal/modules/cjs/helpers.js:22:18) at Object. (C:\cygwin64\home\D-218\workspace\shima\src\tasks\json.js:4:14) at Module._compile (internal/modules/cjs/loader.js:701:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10) at Module.load (internal/modules/cjs/loader.js:600:32) at tryModuleLoad (internal/modules/cjs/loader.js:539:12) at Function.Module._load (internal/modules/cjs/loader.js:531:3)

1
Windows or Mac? Try sudo yarn install instead if npm doesn't workLim Kean Phang
I use windows 10 64 bitVasirajan Mariappan
i was having problem on windows when using npm but i changed to yarn. See if it works for you. -> sudo yarn installLim Kean Phang

1 Answers

0
votes

You have only installed Gulp on you system. Gulp is a task runner. One of your tasks requires using iconv. The error is showing the module "iconv" is not found. Install it with the below, add "-g" if you want install system wide rather than just in this project directory.

npm install iconv

Then in your gulp file import iconv with a line as follows:

var Iconv  = require('iconv').Iconv;

Rerun your task and it should execute fine.