Thanks!
Posts made by charlieknoll
-
RE: Errors running extension starter kit from clean install
I added the packages to the devDependencies in my extension package.json and it fixed the issue. Should I make a pull request to the extension starter kit?
https://github.com/ResponsivePaper/jsreport-responsivepaper-pdf/blob/master/package.json
-
Errors running extension starter kit from clean install
Hi,
I clone the repository, npm install, npm start.
It installs jsreport,
I then navigate to localhost:5488. The console shows the following errors:
ERROR in ../jsreport-reports/studio/ReportEditor.scss
Module build failed (from ./node_modules/mini-css-extract-plugin/dist/loader.js):
ModuleBuildError: Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError(11:6) Unknown word
9 |
10 | .listContainer > div {11 | // it somehow shows the horizontal scrollbar even when no needeit, this workaround to hide it
I delete the comments from ReportEditor.css in the node_modules/jsreport-reports/studio folder
But I get the following errors:
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'cron-builder' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'cronstrue' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-scheduling/studio/ScheduleProperties.js
Module not found: Error: Can't resolve 'ordinal-number-suffix' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-scheduling\studio'
ERROR in ../jsreport-assets/studio/AssetEditor.js
Module not found: Error: Can't resolve 'react-copy-to-clipboard' in 'C:\dev\lib\jsreport-extension-starter-kit\node_modules\jsreport-assets\studio'Any ideas on how to fix?
Thanks
-
RE: Is it possible to update properties of the template before engine runs?
I should have called it
beforeRecipeRender
. I see that the reporter also hasafterTemplatingEnginesExecutedListeners
. I could probably take the scripts extension and add support for that handler.PdfUtils embeds hidden html in the template engine output, I could similarly embed that html and parse it in
afterTemplatingEnginesExecuted
. -
RE: Is it possible to update properties of the template before engine runs?
I think I'd need something similar to pdfUtils to inject data back into the req object and also a new beforeEngineRender global function to set the the new template config. I imagine it would only be possible with a new custom extension.
-
Is it possible to update properties of the template before engine runs?
I'd like to change the chrome template's "format" property based on dynamic data that gets processed by the engine and have it override the default template's format.
For example:
req.template.chrome.format = 'Legal';
would overwrite the template's default setting of "Letter" if the height of the report's html exceeded a certain size.
Is this possible?
-
RE: jsreport v2 beta released - asking for a feedback
Ah thanks, I see it errored on the new spread syntax here:
engineRes.logs.forEach(function (m) {
reporter.logger[m.level](m.message, {...request, timestamp: m.timestamp})
}) -
RE: jsreport v2 beta released - asking for a feedback
I checked the instanceHandler.js and it errors on this line in function getJsreportModuleInstalled:
detectedModule = require(require.resolve(path.join(cwd, 'node_modules', detectedJsreport)))
ERROR: SyntaxError: Unexpected token ...
require.resolve seems to work ok, it returns:
E:\dev\lib\jsreport2\node_modules\jsreport\index.js
It seems there is a syntax error in index.js.
-
RE: jsreport v2 beta released - asking for a feedback
This is what was logged after running jsreport init 2.0.0-beta:
$ jsreport init 2.0.0-beta
jsreport installation not found, installing jsreport@2.0.0-beta version now, wait a moment...
jsreport installation finished..
Creating server.js
Creating package.json
Creating default config jsreport.config.json
Initialized -
RE: jsreport v2 beta released - asking for a feedback
Hi,
I tried installing on Windows 10. When running "jsreport start" I get this error:
Error: Couldn't find a jsreport installation necessary to check if the command is available, if the command is a valid one try to install jsreport first.
at Promise (E:\dev\strata5\jsreport\node_modules\jsreport-cli\lib\instanceHandler.js:50:21)I successfully ran configure and selected all the default options.
-
RE: What am I missing?
Sorry, I should have cc'd @vbmark the question, it was meant for the original post. I was wondering how @vbmark was generating pdf's client side.
-
RE: What am I missing?
I'm curious as to which html to pdf technology you are using? Are you simply relying on the user to save the page as a pdf file?
-
RE: What is the best way to upgrade Jsreport Studio?
Ah, that makes sense. So once jsreport dependencies are verified then jsreport's package.json will be updated and it's version incremented and then jsreport-studio dependency on jsreport will be incremented. I will reinstall jsreport-wkhtmltopdf using npm install -save into jsreport-studio so that that dependency is tracked as well.
-
RE: What is the best way to upgrade Jsreport Studio?
I think I know the problem, npm-check works if I switch to node_modules\jsreport. I also tried the npm-check-updates package and it works only in the node_modules\jsreport directory. Thanks for your help.
-
RE: What is the best way to upgrade Jsreport Studio?
Today I ran npm-check and it said "all your packages look amazing" or something like that. I checked jsreport-xslx and it was still at 1.3.0. I deleted jsreport-xlsx from node_modules and npm install jsreport-xslx and I got 1.3.1. Any other way to check if there are updates to jsreport studio or it's extensions?
-
RE: What is the best way to upgrade Jsreport Studio?
OK, it would be nice to have. That way it would be possible to just run npm upgrade and it would automatically be updated to the latest version. I usually do this on other projects just to make sure I have the latest bits. I can see the case where I missed an announcement of the latest version release and neglected to upgrade.
With the method above, would it upgrade any additional packages such as jsreport-wkhtmltopdf?
-
What is the best way to upgrade Jsreport Studio?
It seems jsreport cli doesn't have an upgrade option. Is the best way to update the version from 1.5.1 to 1.6.0 in the package.json file and delete the node_modules directory?
-
RE: wkhtmltopdf "Unknown long argument --javascript-delay 2000"
Got it, thanks. I see in the docs that the extension pulls the studio in for testing.