How can I install a specific version of jsreport?
-
We've noticed that jsreport init installs the latest version of jsreport.
We install cli like so:mkdir -p /usr/local/var/jsreport cd /usr/local/var/jsreport npm install jsreport-cli@1.3.2 -g jsreport init npm install jsreport-wkhtmltopdf
and expect it to install 1.x version of JS report but we get 2.0 version of CLI and jsreport.
Also what would be the right version of jsreport-wkhtmltopdf for 1.x jsreport?
-
npm install jsreport-cli@1.3.2 -g
this is good, it installs latest v1 version of cli
to install specific version of jsreport with cli use:
jsreport init 1.10.0
(it installs version 1.10.0 which is the latest v1 release)Also what would be the right version of jsreport-wkhtmltopdf for 1.x jsreport?
the latest version of jsreport-wkthmltopdf which should work with jsreport v1 is
1.4.0
, you can install it by usingnpm install jsreport-wkhtmltopdf@1.4.0 --save
-
thank you!
-
A quick additional question, does the NODE_ENV env var drives only the config file to load or does it also enables/disables some functionality?
-
it drives the config file (but in jsreport v1.10.0 you can also configure it to use a specific config for example
jsreport start --configFile '/path/to/config.json'
ornode server.js --configFile '/path/to/config.json'
) and for what i can remember whenNODE_ENV
isproduction
it disables file system synchronization when fs store is used (only if the synchronization option has not been defined explicitly).note: file system synchronization is the behaviour that you get that when saving/editing a template file from your editor (vs code, sublime, atom) it makes jsreport web studio to be reloaded to have the change from your editor in sync.
-
got it! Thanks again!