I’m running an application in Meteor, and install carbone js (a reporting engine), and in trying to setup their example, I get an error in the console that stops it from loading the page, or letting me use any navigation. I need some help figuring our what this error means.
First I do import fs from 'fs'
and import carbone from 'carbone';
in place of their “require” option.
Then in the
Template.xxxxx.onRendered(function() {
carbone.render('../../node_modules/carbone/examples/simple.odt', data, function(err, result){
if (err) {
return console.log(err);
} else {
// write the result
fs.writeFileSync('result.odt', result);
}
});
});
When I do this, in the console I get the error:
caught TypeError: Cannot read properties of undefined (reading 'split')
at module (modules.js?hash=1bff4c9fffe5133aed935ba8427f3ed368933960:66536:41)
at fileEvaluate (modules-runtime-hot.js?hash=325e29e1f9abcee55f3cef85ec8a56670bbc6194:388:7)
at Module.require (modules-runtime-hot.js?hash=325e29e1f9abcee55f3cef85ec8a56670bbc6194:270:27)
at require (modules-runtime-hot.js?hash=325e29e1f9abcee55f3cef85ec8a56670bbc6194:310:21)
at module (modules.js?hash=1bff4c9fffe5133aed935ba8427f3ed368933960:66119:14)
at fileEvaluate (modules-runtime-hot.js?hash=325e29e1f9abcee55f3cef85ec8a56670bbc6194:388:7)
at Module.require (modules-runtime-hot.js?hash=325e29e1f9abcee55f3cef85ec8a56670bbc6194:270:27)
at require (modules-runtime-hot.js?hash=325e29e1f9abcee55f3cef85ec8a56670bbc6194:310:21)
at module (modules.js?hash=1bff4c9fffe5133aed935ba8427f3ed368933960:65490:12)
at fileEvaluate (modules-runtime-hot.js?hash=325e29e1f9abcee55f3cef85ec8a56670bbc6194:388:7)
I’m not sure how to go about fixing this issue. I know it’s the Carbone because when I comment it out the system works fine again.
One thought I had, is maybe it has to be run server side, but I don’t think that’s it.
Any help is greatly appreciated.