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?


  • administrators

    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 using npm 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?


  • administrators

    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' or node server.js --configFile '/path/to/config.json') and for what i can remember when NODE_ENV is production 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!


Log in to reply
 

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.