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

mozjpeg preinstall failed #77

Open
yongyiwong opened this issue Jan 28, 2023 · 0 comments
Open

mozjpeg preinstall failed #77

yongyiwong opened this issue Jan 28, 2023 · 0 comments

Comments

@yongyiwong
Copy link

when I install mozjpeg globally and mozjepg --help, I got this error.
Environment: Ubuntu 22.04.1 LTS
Node version: 14.20.0

Here is the command I tried.

npm -g install mozjpeg
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
/home/gf/.nvm/versions/node/v14.20.0/bin/mozjpeg -> /home/gf/.nvm/versions/node/v14.20.0/lib/node_modules/mozjpeg/cli.js

> mozjpeg@8.0.0 postinstall /home/gf/.nvm/versions/node/v14.20.0/lib/node_modules/mozjpeg
> node lib/install.js

+ mozjpeg@8.0.0
added 163 packages from 52 contributors in 49.827s
mozjpeg --help

events.js:377
      throw er; // Unhandled 'error' event
      ^

Error: spawn /home/gf/.nvm/versions/node/v14.20.0/lib/node_modules/mozjpeg/vendor/cjpeg ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:277:19)
    at onErrorNT (internal/child_process.js:472:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
Emitted 'error' event on ChildProcess instance at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:283:12)
    at onErrorNT (internal/child_process.js:472:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /home/gf/.nvm/versions/node/v14.20.0/lib/node_modules/mozjpeg/vendor/cjpeg',
  path: '/home/gf/.nvm/versions/node/v14.20.0/lib/node_modules/mozjpeg/vendor/cjpeg',
  spawnargs: [ '--help' ]
}

Actually when post install, I don't get any error or message.
Also I have installed all packages automake autoconf libtool dpkg pkgconfig nasm libpng

Is there anyone faced this issue?

Thanks.

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

1 participant