A
A
Alex2020-04-14 23:15:58
phpstorm
Alex, 2020-04-14 23:15:58

GULP error when transferring a project to another system, how to fix it?

There is a project in phpStorm involving GULPJS where there are three tasks. When migrating to a new system, I installed the latest version of NODEJS and copied the project. Also, all phpStorm settings from the Users folder have also been transferred.
However, while running the project, an error appeared in Gulpjs - Failed to list gulp tasks in Can you tell me
how to fix this error?

Error details (spoiler):

spoiler
Failed to list gulp tasks in ftp\gulpfile.js: process finished with exit code 1 (a non-zero exit code means an error)
* Edit settings

$ "D:\Program Files\JetBrains\PhpStorm 2017.3.4\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" ..project_directory..\ftp\node_modules\gulp\bin\gulp.js --no-color --gulpfile ..project_directory..\ftp\gulpfile.js --tasks-json
Error: Cannot find module './constants/metadata_keys'
Require stack:
- ..project_directory..\ftp\node_modules\inversify\lib\inversify.js
- ..project_directory..\ftp\node_modules\javascript-obfuscator\dist\index.js
- ..project_directory..\ftp\node_modules\gulp-javascript-obfuscator\index.js
- ..project_directory..\ftp\gulpfile.js
- ..project_directory..\ftp\node_modules\gulp\node_modules\gulp-cli\lib\versioned\^4.0.0\index.js
- ..project_directory..\ftp\node_modules\gulp\node_modules\gulp-cli\index.js
- ..project_directory..\ftp\node_modules\gulp\bin\gulp.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:952:15)
at Function.Module._load (internal/modules/cjs/loader.js:835:27)
at Module.require (internal/modules/cjs/loader.js:1012:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object. (..project_directory..\ftp\node_modules\inversify\lib\inversify.js:3:12)
at Module._compile (internal/modules/cjs/loader.js:1123:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
at Module.load (internal/modules/cjs/loader.js:972:32)
at Function.Module._load (internal/modules/cjs/loader.js:872:14)
at Module.require (internal/modules/cjs/loader.js:1012:19)

Process finished with exit code 1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Diman Suvorkin, 2020-04-15
@alexjet73

Just reinstall dependencies. Remove node_modules from package-lock.json and run npm i.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question