Closed anaszgh closed 6 years ago
I managed to fix this issue, i have found that in the configuration of jsreport-core you pass a property called rootDirectory, but in the jsreport-phantom-pdf it uses appDirectory
From jsreport-phantom-pdf Line:65
var npm = path.join(this.reporter.options.appDirectory, 'node_modules')
so in the constructor of the jsreport-core i have passed these values in the constructor
var jsreport = require('jsreport-core')({
rootDirectory:__dirname,
tempDirectory:__dirname,
appDirectory:__dirname
})
and that fixed it 😄
Hello,
I'm trying to use JsReport-core with Phantom-pdf to generate pdf out of html
Here is the implementation
It seems that it always tried to run it from the TEMP folder, even when i specify the root directory And it returns this error (on both Windows & MacOS High Sierra)
And here is the dependencies section of the package.json