Closed paddotk closed 4 years ago
I figured out what went wrong. The tool that this library uses wasn't found, because dummy me missed a step in the installation; renaming it (I don't read so well, seemingly 😛)
For others facing the same issue, you can get the (non-perl) standalone version, put the unzipped exiftool(-k).exe file in C:/Windows (assuming you're on Windows of course) and rename it to exiftool.exe.
That said, I think it would be a good idea to implement error handling upon failing to find the exiftool, so that an error can clarify what went wrong; in this case, the tool not being found.
I'm trying to get exiftool working in my Electron app, but simply running the demo code as provided on exiftool's main Github page breaks the application with some vague errors.
Error: write EPIPE
on line 82 in exiftool.js. (exif.stdin.write(source);
). In the JS console I see the errorUncaught Error: spawn exiftool ENOENT
which refers tochild_process
.I should mention that before this, I had an error stating that
child_process.spawn
is not a function. To resolve this, I copied exiftool.js to my project'ssrc
directory and changedvar ChildProcess = require('child_process');
tovar ChildProcess = window.require('child_process');
to get it to load child_process properly. When I debug, the var ChildProcess does indeed seem to contain all the right stuff, including the spawn function. I also had to prependwindow.
to thefs
import to make that work so I guess that should be fine..Any ideas on what's happening?