Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Cannot find module 'webp-converter/cwebp' >> problem and solution #30

Open
svyatoslavlp opened this issue Jul 17, 2020 · 3 comments

Comments

@svyatoslavlp
Copy link

Install
npm i gulp-webp --save-dev
npm i gulp-webp-html --save-dev
npm i gulp-webpcss --save-dev
and other packages for Gulp
then run gulp in the terminal
and I get this:
internal / modules / cjs / loader.js: 985
throw err;
^

Error: Cannot find module 'webp-converter / cwebp'
Require stack:

  • /home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist/WebpBase64.js
  • /home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist/Webpcss.js
  • /home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist/index.js
  • /home/svyatoslavlp/github/2020/akadem1_2020/node_modules/gulp-webpcss/index.js
  • /home/svyatoslavlp/github/2020/akadem1_2020/gulpfile.js
  • /home/svyatoslavlp/.nvm/versions/node/v12.16.1/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js
  • /home/svyatoslavlp/.nvm/versions/node/v12.16.1/lib/node_modules/gulp-cli/index.js
  • /home/svyatoslavlp/.nvm/versions/node/v12.16.1/lib/node_modules/gulp-cli/bin/gulp.js
    at Function.Module._resolveFilename (internal / modules / cjs / loader.js: 982: 15)
    at Function.Module._load (internal / modules / cjs / loader.js: 864: 27)
    at Module.require (internal / modules / cjs / loader.js: 1044: 19)
    at require (internal / modules / cjs / helpers.js: 77: 18)
    at Object. (/home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist/WebpBase64.js:33:19)
    at Module._compile (internal / modules / cjs / loader.js: 1158: 30)
    at Object.Module._extensions..js (internal / modules / cjs / loader.js: 1178: 10)
    at Module.load (internal / modules / cjs / loader.js: 1002: 32)
    at Function.Module._load (internal / modules / cjs / loader.js: 901: 14)
    at Module.require (internal / modules / cjs / loader.js: 1044: 19) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist/WebpBase64.js',
    '/home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist/Webpcss.js',
    '/home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist/index.js',
    '/home/svyatoslavlp/github/2020/akadem1_2020/node_modules/gulp-webpcss/index.js',
    '/home/svyatoslavlp/github/2020/akadem1_2020/gulpfile.js',
    '/home/svyatoslavlp/.nvm/versions/node/v12.16.1/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',
    '/home/svyatoslavlp/.nvm/versions/node/v12.16.1/lib/node_modules/gulp-cli/index.js',
    '/home/svyatoslavlp/.nvm/versions/node/v12.16.1/lib/node_modules/gulp-cli/bin/gulp.js'
    ]
    }

solution (might come in handy):
copy files from: node_modules> webp-converter> src
in: node_modules> webp-converter

everything is working

@dkrnl
Copy link

dkrnl commented Jul 31, 2020

other solution:

npm i [email protected] --save-exact

@EvgenLebedev-1984
Copy link

Установить
npm i gulp-webp --save-dev
npm i gulp-webp-html --save-dev
npm i gulp-webpcss --save-dev
и другие пакеты для глотка
затем бегите глотком в терминал
и я получаю это:
внутренний / модули / cjs / загрузчик.js: 985
бросок err;
^

Ошибка: не удается найти модуль 'webp-converter / cwebp'
Требуется стек:

  • /home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist / WebpBase64.JS
  • /home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist / Webpcss.JS
  • /home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist / index.JS
  • /home/svyatoslavlp/github/2020/akadem1_2020/node_modules/gulp-webpcss / index.JS
  • /home/svyatoslavlp/github/2020/akadem1_2020 / gulpfile.JS
  • / главная/святославлп/.nvm/versions/node/v12. 16.1/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.JS
  • / главная/святославлп/.nvm / versions/node/v12. 16.1/lib/node_modules/gulp-cli/index.JS
  • / главная/святославлп/.nvm / versions/node/v12. 16.1/lib/node_modules/gulp-cli/bin/gulp.js
    на работе.Модуль._resolveFilename (internal / modules / cjs / loader.js: 982: 15)
    на работе.Модуль._load (internal / modules / cjs / loader.js: 864: 27)
    в модуле.require (internal / modules / cjs / loader.js: 1044: 19)
    at require (internal / modules / cjs / helpers.js: 77: 18)
    на объектах. (/home/svyatoslavlp/github / 2020/akadem1_2020/node_modules/webpcss/dist / WebpBase64.js: 33: 19)
    в модуле._compile (internal / modules / cjs / loader.js: 1158: 30)
    на объектах.Модуль._выдвижений..js (internal / modules / cjs / loader.js: 1178: 10)
    в модуле.load (internal / modules / cjs / loader.js: 1002: 32)
    на работе.Модуль._load (internal / modules / cjs / loader.js: 901: 14)
    в модуле.require (internal / modules / cjs / loader.js: 1044: 19) {
    код: 'MODULE_NOT_FOUND',
    requireStack: [
    '/home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist / WebpBase64.js',
    '/home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist / Webpcss.js',
    '/home/svyatoslavlp/github/2020/akadem1_2020/node_modules/webpcss/dist / index.js',
    '/home/svyatoslavlp/github / 2020/akadem1_2020/node_modules/gulp-webpcss / index.js',
    '/home/svyatoslavlp/github/2020/akadem1_2020 / gulpfile.js',
    '/главная/святославлп/.nvm/versions/node/v12. 16.1/lib/node_modules/gulp-cli/lib/versioned/^4.0.0/index.js',
    '/главная/святославлп/.nvm / versions/node/v12. 16.1/lib/node_modules/gulp-cli/index.js',
    '/главная/святославлп/.nvm / versions/node/v12. 16.1/lib/node_modules/gulp-cli/bin/gulp.js'
    ]
    }

решение (может пригодиться):
скопируйте файлы из: node_modules> webp-converter> > src>>
in: node_modules> webp-конвертер

все работает

была такая же проблема, сделал как в описании, все зарабтоало, спс

@ielkina
Copy link

ielkina commented Mar 15, 2024

спасибо помагло

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants