Skip to content

Process exited before Archiver could finish emitting data at #1

Open
@tabacha

Description

@tabacha

I have tried to start with the example in readme.md.
I have created an ott file and added some document variable in it.

Then i have started the following code:

var fs = require('fs')
  , odt = require('odt')
  , template = odt.template
  , createWriteStream = fs.createWriteStream
var doc = 'ADFC-Antrag.ott';
var values = {
    'Polizei_K': { type: 'string', value: '99' },
    'Polizei_Str':{ type: 'string', value: 'Musterstr 42' },
    'Polizei_PLZ':{ type: 'string', value: '21149' },
};

// apply values
template(doc)
  .apply(values)
  .on('error', function(err){
    throw err;
  })
  .finalize(function(bytes){
    console.log('The document is ' + bytes + ' bytes large.');
  })
  .pipe(createWriteStream('mydocument.odt'))
  .on('close', function(){
    console.log('document written');
  });

Result

/home/sven/testodt/node_modules/odt/node_modules/archiver/lib/archiver/core.js:79
      throw new Error('Process exited before Archiver could finish emitting da
            ^
Error: Process exited before Archiver could finish emitting data
    at null.<anonymous> (/home/sven/testodt/node_modules/odt/node_modules/archiver/lib/archiver/core.js:79:13)
    at process.g (events.js:180:16)
    at process.EventEmitter.emit (events.js:95:17)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions