S
S
Sergey Romanyuk2020-02-01 16:34:44
gulp.js
Sergey Romanyuk, 2020-02-01 16:34:44

How to solve gulp project build issue?

When starting the assembly, I get this error, the gulp-responsive package has been reinstalled many times already and nothing works, I didn’t change anything in the tasks in gulpfile.js, it just stopped working at one moment, after reinstalling Windows, but I installed everything as it was before (all packages, libraries, etc) the problem was only with this package

$ gulp
internal/modules/cjs/loader.js:796
throw err;
^

Error: Cannot find module 'gulp-responsive'
Require stack:
- C:\Users\ideapad320\Desktop\site-portfolio\gulpfile.js
- C:\Users\ideapad320\AppData\Roaming\npm\node_modules\gulp\node_modules \gulp-cli\lib\versioned\^4.0.0\index.js
- C:\Users\ideapad320\AppData\Roaming\npm\node_modules\gulp\node_modules\gulp-cli\index.js
- C:\Users\ideapad320\AppData\Roaming\npm\node_modules\gulp\bin\gulp.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.Module._load (internal/modules/cjs/loader.js:686:27)
at Module.require (internal/modules/cjs/loader.js:848:19)
at require (internal/modules/cjs/helpers.js:74:18 )
at Object. (C:\Users\ideapad320\Desktop\site-portfolio\gulpfile.js:12:18)
at Module._compile (internal/modules/cjs/loader.js:955:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:991:10)
at Module.load (internal/modules/cjs/loader.js:811:32)
at Function.Module._load (internal/modules/cjs/loader.js :723:14)
at Module.require (internal/modules/cjs/loader.js:848:19) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'C:\\Users\\ideapad320\\Desktop\\site-portfolio\\gulpfile. js',
'C:\\Users\\ideapad320\\AppData\\Roaming\\npm\\node_modules\\gulp\\node_modules\\gulp-cli\\lib\\versioned\\^4.0.0\\index .js',
'C:\\Users\\ideapad320\\AppData\\Roaming\\npm\\node_modules\\gulp\\node_modules\\gulp-cli\\index.js',
'C:\\Users\ \ideapad320\\AppData\\Roaming\\npm\\node_modules\\gulp\\bin\\gulp.js'
]
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arseny, 2020-02-01
Matytsyn @ArsenyMatytsyn

1. Remove package-lock.json
2. Remove node_modules (clean up, check permissions and that all key dependencies are in package.json)
3. Run npm install (should be package.json)
4. Enjoy life
PS: Well, yes , check module compatibility versions.
PPS: The --legacy-per-deeps flag or installing via yarn can also help.

S
Sergey Valitov, 2020-02-02
@serejatoje

I had such an error. It worked when I removed gulp-responsive (fortunately, it was not needed in the layout) and poked npm install. Everything worked for a colleague initially, so there is more of a compatibility-versioning problem here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question