You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add the <ImageComponent /> to the word-memory.js file, the process silently fails... The same document does work when rendering to a file directly.
word-memory.js
importfsfrom'fs';importReact,{Component}from'react';importTextComponentfrom'../examples/Text';import{render,Document,Text}from'../src/';// Uncomment any of the below component to see what they renderimportFooterComponentfrom'../examples/Footer';importHeaderComponentfrom'../examples/Header';importHrComponentfrom'../examples/Hr';importLineBreakComponentfrom'../examples/LineBreak';importPageBreakComponentfrom'../examples/PageBreak';importTableComponentfrom'../examples/Table';importListComponentfrom'../examples/List';importImageComponentfrom'../examples/Image';classMyDocumentextendsComponent{render(){return(<Document><TextComponent/><ImageComponent/></Document>);}}render(<MyDocument/>).then((stream)=>{fs.open('./demo/Memory.docx','w+',stream.length,(err,fd)=>{if(err){console.log(err);}fs.write(fd,stream.toBuffer(),(writeErr)=>{if(writeErr){console.log(writeErr);}console.log('Docx generated and saved to ./demo/Memory.docx');});});});
CLI output
The text was updated successfully, but these errors were encountered:
When I add the
<ImageComponent />
to the word-memory.js file, the process silently fails... The same document does work when rendering to a file directly.word-memory.js
CLI output
The text was updated successfully, but these errors were encountered: