gif, jpg and png paths incorrect
arpie42 opened this issue · comments
Using feri from the command line is no problem at all but I decided to try to do something more complex by using feri from a node app. The difference is that the command line uses the global feri installation in which dependencies are installed in a folder 'node_modules/feri/node_modules/...' but the local install doesn't contain a node_modules folder inside the feri module folder. Perhaps I am not installing it correctly?
The upshot is that the 'shortcuts' used on lines 29 to 35 of build.js don't work - the paths are invalid. If I replace them with, eg. jpg = require("jpegtran-bin"), all works correctly.
The script I am trying to run is simple :
#!/usr/bin/env node
var feri = require('feri');
var config = feri.config;
config.path.source = "src";
config.path.dest = "build";
feri.build.processBuild();
and the resulting errors are like this (the last line shows the erroneous path to a non-existent node_modules subdirectory):
(node:19230) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 176): Error: Command failed: "/home/arpie/Projects/PandP/palmerpalmer.fr/node_modules/feri/node_modules/jpegtran-bin/vendor/jpegtran" -copy none -optimize -progressive -outfile "/home/arpie/Projects/PandP/palmerpalmer.fr/build/htdocs/galleries/portes/uploads/pict0021 (Modified).jpg" "/home/arpie/Projects/PandP/palmerpalmer.fr/src/htdocs/galleries/portes/uploads/pict0021 (Modified).jpg"
/bin/sh: /home/arpie/Projects/PandP/palmerpalmer.fr/node_modules/feri/node_modules/jpegtran-bin/vendor/jpegtran: No such file or directory
Sorry for the delay. Back from holidays and slowly getting back into the flow of things. Will take a look at this, just not sure exactly when yet.
Thanks for your patience in the meantime. ^_^
Version 2.0.2 is available on GitHub and NPM now. Give it a whirl and see if that works better for you. ^_^
Closing issue since, as far as I know, it is resolved.
Do feel free to reach out to me if you have any trouble though. Cheers!