electron-wix-msi icon indicating copy to clipboard operation
electron-wix-msi copied to clipboard

RangeError: Invalid string length (ERROR ON COMPILE)

Open zerozelta opened this issue 6 years ago • 3 comments

Hi i have a strange problem running the script, i can't solve the problem, i have this code

async function compile(execName){
    
// Step 1: Instantiate the MSICreator
const msiCreator = new MSICreator({
    appDirectory: appDirectoryRoot+ "/app-win32-x64",
    outputDirectory: outputDirectory + "/app-win32-x64",
    description: 'description example',
    exe: execName,
    name: execName,
    shortcutFolderName:"app-name",
    manufacturer: 'app-author',
    version: "1.0.0",
    ui:{
        chooseDirectory: true,
    }
});
 
// Step 2: Create a .wxs template file
    await msiCreator.create();
 
// Step 3: Compile the template to a .msi file
    await msiCreator.compile();
}

compile("cinder-win32-x64");

this is the console output

electron-wix-msi: Using light.exe (3.11.1.2318) and candle.exe (3.11.1.2318) C:\Users\zerozelta\Documents\ElectronProjects\Cinder\node_modules\electron-wix-msi\lib\utils\spawn.js:13 stdout += data;

RangeError: Invalid string length at Socket.fork.stdout.on (C:\Users\zerozelta\Documents\ElectronProjects\Cinder\node_modules\electron-wix-msi\lib\utils\spawn.js:13:23) at Socket.emit (events.js:182:13) at addChunk (_stream_readable.js:283:12) at readableAddChunk (_stream_readable.js:264:11) at Socket.Readable.push (_stream_readable.js:219:10) at Pipe.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)

  • the input and output paths seems to be correct
  • the files .wxs .wixobj and .wixpdb are generated (im not sure if .wixobj and .wixpdb are fully writed)

I know that is a problem with Node and V8 (something exeed the maximum string size), but I followed the steps of use and practically do not modify the example code. i dont know what is the mistake or how can I solve this

zerozelta avatar Oct 26 '18 03:10 zerozelta

old thread, but I just ran into the same problem.

Has there been any news on this or have you been able to fix it on your own?

GeraldIr avatar Apr 02 '19 12:04 GeraldIr

@zerozelta

@GeraldIr

Just ran into this today, is there any update?

YeetOrBeYate avatar Sep 10 '21 19:09 YeetOrBeYate

sorry but i didn't come up with any solution with this

zerozelta avatar Sep 10 '21 20:09 zerozelta