Atyantik/react-pwa

Module build failed (from ./node_modules/webp-loader/index.js)

irajneeshgupta opened this issue · 5 comments

Trying to run this project but seems like node_module issue. Please let me know what is wrong?
npm install , run successfully , after that it should run fine.
I am trying fresh and got this.

react-pwa# sudo npm start

react-pwa@2.2.8 start /var/www/html/react-pwa
pawjs --no-cache --env=development start

=========================================================
Compiling files.
This may take time depending on the application size.
Thank you for your patience.

(node:11205) UnhandledPromiseRejectionWarning: ModuleBuildError: Module build failed (from ./node_modules/webp-loader/index.js):
Error: spawn /var/www/html/react-pwa/node_modules/cwebp-bin/vendor/cwebp ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
at /var/www/html/react-pwa/node_modules/webpack/lib/NormalModule.js:316:20
at /var/www/html/react-pwa/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /var/www/html/react-pwa/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/var/www/html/react-pwa/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /var/www/html/react-pwa/node_modules/webp-loader/index.js:32:9
(node:11205) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:11205) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:11205) UnhandledPromiseRejectionWarning: ModuleBuildError: Module build failed (from ./node_modules/webp-loader/index.js):
Error: spawn /var/www/html/react-pwa/node_modules/cwebp-bin/vendor/cwebp ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
at onErrorNT (internal/child_process.js:467:16)
at processTicksAndRejections (internal/process/task_queues.js:84:21)
at /var/www/html/react-pwa/node_modules/webpack/lib/NormalModule.js:316:20
at /var/www/html/react-pwa/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /var/www/html/react-pwa/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/var/www/html/react-pwa/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /var/www/html/react-pwa/node_modules/webp-loader/index.js:32:9
(node:11205) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)

@irajneeshgupta can you please share your node and npm version as well?

@irajneeshgupta I found a similar issue at cwebp imagemin/cwebp-bin#36
Does that relate to your issue?

npm -v
6.13.6
node -v
v13.8.0

resolved!
this issue has working solution.
imagemin/imagemin-webp#22