Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Callback Error object #21

Flo-Schield-Bobby opened this Issue · 6 comments

2 participants


Hi srod,

I'm trying to implement this pretty asynchronous minifier,
I've downloaded it, required it, but the minify function always give me back the error arg, and it doesn't work.

I'm working on a node-webkit app on a windows system (the app is supposed to be available on Linux / Mac / Windows).

And I call the minifier in this way :
var minifier = require('node-minify');
new minifier.minify({
type: 'uglifyjs',
fileIn: ["C:\Users...\main.js", ...],
fileOut: "C:\Users...\app.min.js",
buffer: 1000 * 1024,
callback: function (e) {
console.log('callback error', e);

The full error object is :
Error {
killed: false,
code: 1,
signal: null

I was asking myself if it was caused by the absolute filepaths, but I do not have the choice, because I am working on a new created folder (created with fs.mkdirSync...).
I've tried both linux-style and windows-like filepaths (C:... and C:/...).
I create the output file and it is working, but it do not put the minified content on it.

Do you have an idea ?



I think too, that must be the cause.
Can't you use relative path ? fileIn: ["../../main.js"]

Or maybe you already solve ? (sorry for the delay)


Hi, sorry for the late too, I switched projects and didn't see that notification !

And no, I didn't fix it at the moment.
But the issue I have is that I would like to minify some files who are not in the working directory !

So let's imagine the case :

  • I've got an app (so the working directory) that I launch with node-webkit. (I guess it's globaly the same effect as launching an app in CLI).

  • In this app, I'm creating a new folder, on a user-choice form ( that allow to select a folder on the user laptop / desktop. Then I add some files in that new folder, that I would to minify on the fly.

Do you think it's possible without absolute links ?
It's for some internal stuff in my company, nobody really cares about security problems that some kind of application could generate :)

Thanks for your help !


And can't you copy those files in the working directory and then copy minified files in the user-choice folder ?
I don't see other solution, I think this is more a bad access to the files.

Or maybe the temp path, can you specify another path ?

new compressor.minify({
type: 'yui-js',
fileIn: 'public/js/base.js',
fileOut: 'public/js/base-min-yui.js',
tempPath: '/tmp',
callback: function(err){


I didn't try to specify a temp path at the moment, but maybe it could be interesting for me, how is it working ?
Can I specify my new folder as the tempPath ?

I should try it I think, and let you know the result.


Indeed, all temporary files will be created in the temp folder.
Give a try :)


Okay very nice, I'll check that soon :)

@srod srod closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.