photostructure / exiftool-vendored.js

Fast, cross-platform Node.js access to ExifTool
https://photostructure.github.io/exiftool-vendored.js/
MIT License
405 stars 37 forks source link

Perl not installed error #182

Closed Circuit8 closed 1 month ago

Circuit8 commented 1 month ago

Hi there. I'm running into an issue with exiftool-vendored versions 22 and above on Mac and Linux in Electron. When attempting to use exiftool v26 I get the following error:

Perl must be installed. Please add Perl to your $PATH and try again.
exiftool-vendored/src/ExifTool.ts:169:11

Looks like it's to do with the introduction of which("perl").

Downgrading to version 21 solves the issue.

Exiftool-vendored: v22-26 OS: Ubuntu 22 & Mac 12.6 Node: v20.x Electron: v29.x

Let me know if you need any more info. Thanks again for the great work with exiftool-vendored.

prantikseal commented 1 month ago

facing the same error, worked in version 21 thanks

mceachen commented 1 month ago
mrm@m1 test % node
Welcome to Node.js v20.13.1.
Type ".help" for more information.
> require("exiftool-vendored").exiftool.version().then(console.dir)
Promise {
  <pending>,
  [Symbol(async_id_symbol)]: 105,
  [Symbol(trigger_async_id_symbol)]: 90
}
> '12.84'

If you open a bug, at least provide some sort of reproduction. I've got to be able to reproduce the bug in order to know that I've addressed it. Feel free to reopen when/if you provide that.

Edit: I'll just assume this is on some random customer's computer, and that they fsck'ed up their $PATH. The next release will check specifically for the shebang path (/usr/bin/perl) before throwing, which I think should be a reasonable backstop in case PATH is empty for whatever reason.

Circuit8 commented 1 month ago

Apologies for not providing a reproduction. 26.1.0 has seemed to fix the issue though, thanks for that.